Skip to content

Commit

Permalink
fixed: trac xbmc#11722. compile on platforms where GL_BGRA_EXT is not…
Browse files Browse the repository at this point in the history
… defined
  • Loading branch information
theuni committed Jul 18, 2011
1 parent 594a2d5 commit f61b591
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xbmc/guilib/TextureGL.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit f61b591

Please sign in to comment.