projects
/
fishladder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix up build script
[fishladder.git]
/
vg
/
vg_tex.h
diff --git
a/vg/vg_tex.h
b/vg/vg_tex.h
index 967337a8fa1a1e40cdbf3296a1347d08e445094c..a9c24c0a68cd4e27e58cc801c248a0b521c8e842 100644
(file)
--- a/
vg/vg_tex.h
+++ b/
vg/vg_tex.h
@@
-55,8
+55,7
@@
static inline void vg_tex2d_clamp(void)
static GLuint vg_tex2d_rgba( const char *path )
{
static GLuint vg_tex2d_rgba( const char *path )
{
- int x,y,nc;
- stbi_set_flip_vertically_on_load( 1 );
+ int x,y;
i64 length;
u8 *src_data = vg_asset_read_s( path, &length );
i64 length;
u8 *src_data = vg_asset_read_s( path, &length );
@@
-67,7
+66,8
@@
static GLuint vg_tex2d_rgba( const char *path )
if( src_data )
{
if( src_data )
{
- u8 *tex_buffer = stbi_load_from_memory( src_data, length, &x, &y, &nc, 4 );
+ u8 *tex_buffer = qoi_decode( src_data, length, &x, &y, 4 );
+
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, x, y, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex_buffer );
free( tex_buffer );
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, x, y, 0, GL_RGBA, GL_UNSIGNED_BYTE, tex_buffer );
free( tex_buffer );