twn_textures.c: handle RGB image files
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user