From cbd05da5d12db002502090f3ba88afd915d6ae45 Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Tue, 17 Sep 2013 15:33:46 -0700 Subject: [PATCH] OpenGL2: Fix for "unsupported framebuffer format" bug --- code/renderergl2/tr_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/renderergl2/tr_image.c b/code/renderergl2/tr_image.c index a80c975b..09031dc0 100644 --- a/code/renderergl2/tr_image.c +++ b/code/renderergl2/tr_image.c @@ -2303,6 +2303,9 @@ image_t *R_CreateImage( const char *name, byte *pic, int width, int height, imgT qglTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGBA8, width, height, 0, GL_BGRA, GL_UNSIGNED_BYTE, pic); qglTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGBA8, width, height, 0, GL_BGRA, GL_UNSIGNED_BYTE, pic); + if (image->flags & IMGFLAG_MIPMAP) + qglGenerateMipmapEXT(GL_TEXTURE_CUBE_MAP); + image->uploadWidth = width; image->uploadHeight = height; }