X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=src%2Fvg%2Fvg_tex.h;h=e92e5f152582258af9b0c73d59713a68f1be8764;hb=367883958336d1c04c8a304af6119b21f0f2f15a;hp=9e0c56f6e18bebb8551edaa7add1ab586759dd3b;hpb=6aeba08ad9ad8bdecafcfd9f946173e99a84fc59;p=vg.git diff --git a/src/vg/vg_tex.h b/src/vg/vg_tex.h index 9e0c56f..e92e5f1 100644 --- a/src/vg/vg_tex.h +++ b/src/vg/vg_tex.h @@ -11,6 +11,12 @@ #define VG_TEXTURE_NEAREST 0x8 #define VG_TEXTURE_ALLOCATED_INTERNAL 0x10 +#define QOI_IMPLEMENTATION +#define QOI_MALLOC vg_alloc +#define QOI_FREE vg_free + +#include "phoboslab/qoi.h" + struct vg_tex2d { const char *path; @@ -88,8 +94,8 @@ static GLuint vg_tex2d_rgba( const char *path ) glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, info.width, info.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex_buffer ); - free( tex_buffer ); - free( src_data ); + vg_free( tex_buffer ); + vg_free( src_data ); } else {