twn_textures.c: handle RGB image files

This commit is contained in:
2024-09-23 14:35:46 +03:00
parent c8469e9416
commit e093a6d492
2 changed files with 5 additions and 2 deletions

View File

@ -41,6 +41,9 @@ void upload_gpu_texture(gpu_texture texture, void *pixels, int channels, int wid
if (channels == 4) {
format_internal = GL_RGBA8;
format = GL_RGBA;
} else if (channels == 3) {
format_internal = GL_RGBA8;
format = GL_RGB;
} else if (channels == 1) {
format_internal = GL_ALPHA;
format = GL_ALPHA;