aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl/opengl-graphics.cpp
diff options
context:
space:
mode:
authorDavid-John Willis2012-08-08 13:37:32 +0100
committerDavid-John Willis2012-08-08 13:37:32 +0100
commit4cd34733a39fd64964c6d50a108d2c9e12634385 (patch)
tree314f4e97e633857e2ff52114ae911f566a878ff4 /backends/graphics/opengl/opengl-graphics.cpp
parent546e2086e32c42602cede84c961bbacab75ebdb4 (diff)
downloadscummvm-rg350-4cd34733a39fd64964c6d50a108d2c9e12634385.tar.gz
scummvm-rg350-4cd34733a39fd64964c6d50a108d2c9e12634385.tar.bz2
scummvm-rg350-4cd34733a39fd64964c6d50a108d2c9e12634385.zip
OPENGL: GL_BGRA does not exist in every GLES implementation.
* It definately does not exist in the GLES implementations I can test with. * Don't configure if USE_GLES is set.
Diffstat (limited to 'backends/graphics/opengl/opengl-graphics.cpp')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index dce902d894..c99652d2bd 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -918,11 +918,6 @@ void OpenGLGraphicsManager::getGLPixelFormat(Graphics::PixelFormat pixelFormat,
intFormat = GL_RGBA;
glFormat = GL_RGBA;
gltype = GL_UNSIGNED_SHORT_5_5_5_1;
- } else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)) { // RGB555
- bpp = 2;
- intFormat = GL_RGB;
- glFormat = GL_BGRA;
- gltype = GL_UNSIGNED_SHORT_1_5_5_5_REV;
} else if (pixelFormat == Graphics::PixelFormat(2, 4, 4, 4, 4, 12, 8, 4, 0)) { // RGBA4444
bpp = 2;
intFormat = GL_RGBA;
@@ -936,6 +931,13 @@ void OpenGLGraphicsManager::getGLPixelFormat(Graphics::PixelFormat pixelFormat,
glFormat = GL_RGB;
gltype = GL_UNSIGNED_BYTE;
#ifndef USE_GLES
+ } else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)) { // RGB555
+ // GL_BGRA does not exist in every GLES implementation so should not be configured if
+ // USE_GLES is set.
+ bpp = 2;
+ intFormat = GL_RGB;
+ glFormat = GL_BGRA;
+ gltype = GL_UNSIGNED_SHORT_1_5_5_5_REV;
} else if (pixelFormat == Graphics::PixelFormat(4, 8, 8, 8, 8, 16, 8, 0, 24)) { // ARGB8888
bpp = 4;
intFormat = GL_RGBA;