diff --git a/graphics/tinygl/texture.cpp b/graphics/tinygl/texture.cpp index 06f4d673bd0..8ade301ca8e 100644 --- a/graphics/tinygl/texture.cpp +++ b/graphics/tinygl/texture.cpp @@ -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"); }