From efb2d293d5e849fc96e4e386d55a7611795561aa Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Fri, 19 Jul 2024 15:52:14 +1000 Subject: clean up texture type handling a little bit --- src/new_render/render.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/new_render/render.c') diff --git a/src/new_render/render.c b/src/new_render/render.c index dcaa5a5..b5311c8 100644 --- a/src/new_render/render.c +++ b/src/new_render/render.c @@ -156,13 +156,15 @@ TextureData TextureDataLoad(const char* path, bool invert_y) { stbi_set_flip_vertically_on_load(invert_y); #pragma GCC diagnostic ignored "-Wpointer-sign" - char* data = stbi_load(path, &width, &height, &num_channels, STBI_rgb); + char* data = stbi_load(path, &width, &height, &num_channels, 0); if (data) { DEBUG("loaded texture: %s", path); } else { WARN("failed to load texture"); } + // printf("width: %d height: %d num channels: %d\n", width, height, num_channels); + unsigned int channel_type; GPU_TextureFormat format; if (num_channels == 4) { -- cgit v1.2.3-70-g09d2