From c4c97c3571789bcb6cde8b3a959f7bf93013a0a8 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 28 Mar 2013 15:41:25 +0000 Subject: [PATCH] fix GL_BGRA error on gles 2 --- panda/src/gles2gsg/gles2gsg.h | 1 + panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/panda/src/gles2gsg/gles2gsg.h b/panda/src/gles2gsg/gles2gsg.h index 55ddb45ae9..ec24b6d470 100644 --- a/panda/src/gles2gsg/gles2gsg.h +++ b/panda/src/gles2gsg/gles2gsg.h @@ -85,6 +85,7 @@ typedef char GLchar; #define GL_TEXTURE_3D GL_TEXTURE_3D_OES #define GL_MAX_3D_TEXTURE_SIZE GL_MAX_3D_TEXTURE_SIZE_OES #define GL_SAMPLER_3D GL_SAMPLER_3D_OES +#define GL_BGRA GL_BGRA_EXT #undef SUPPORT_IMMEDIATE_MODE #define APIENTRY diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 41d7100f7f..c546ebd7e8 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -4397,11 +4397,9 @@ framebuffer_copy_to_ram(Texture *tex, int z, const DisplayRegion *dr, GLCAT.spam(false) << "GL_BGR, "; break; #endif -#ifndef OPENGLES_2 case GL_BGRA: GLCAT.spam(false) << "GL_BGRA, "; break; -#endif default: GLCAT.spam(false) << "unknown, "; break;