TINYGL: Fixed support to RGB textures.

This commit is contained in:
Stefano Musumeci 2014-08-13 14:36:53 +02:00
parent 64b0baa7a1
commit d0579291bd

View file

@ -148,7 +148,7 @@ void glopTexImage2D(GLContext *c, GLParam *p) {
pixels = temp.getRawBuffer();
do_free_after_rgb2rgba = true;
}
} else if (format != TGL_RGBA || type != TGL_UNSIGNED_BYTE) {
} else if (!(format == TGL_RGBA || format == TGL_RGB || format == TGL_BGR) || type != TGL_UNSIGNED_BYTE) {
error("tglTexImage2D: combination of parameters not handled");
}