aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortheuni <theuni-nospam-@xbmc.org>2011-07-18 00:32:07 -0400
committertheuni <theuni-nospam-@xbmc.org>2011-07-18 11:31:30 -0400
commitb2f2fa7c0df83b6bc9366983812e4591920bd302 (patch)
tree491a8e27e68088cda632bdfb13686c46b74d541e
parentaf7b82846d3c5351daf7098a86732e75805eb0c3 (diff)
fixed: trac #11722. compile on platforms where GL_BGRA_EXT is not defined
-rw-r--r--xbmc/guilib/TextureGL.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/xbmc/guilib/TextureGL.cpp b/xbmc/guilib/TextureGL.cpp
index 520af9e60e..8adf914d80 100644
--- a/xbmc/guilib/TextureGL.cpp
+++ b/xbmc/guilib/TextureGL.cpp
@@ -130,8 +130,15 @@ void CGLTexture::LoadToGPU()
// All incoming textures are BGRA, which GLES does not necessarily support.
// Some (most?) hardware supports BGRA textures via an extension.
// If not, we convert to RGBA first to avoid having to swizzle in shaders.
+ // Explicitly define GL_BGRA_EXT here in the case that it's not defined by
+ // system headers, and trust the extension list instead.
+#ifndef GL_BGRA_EXT
+#define GL_BGRA_EXT 0x80E1
+#endif
+
GLint internalformat;
GLenum pixelformat;
+
if (g_Windowing.SupportsBGRA())
{
internalformat = pixelformat = GL_BGRA_EXT;