aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl
diff options
context:
space:
mode:
authorJohannes Schickel2016-01-02 02:22:09 +0100
committerJohannes Schickel2016-03-16 20:29:26 +0100
commitdb2917dde5e8aaf9514e19772b8f0f6646b18deb (patch)
tree7c7246aad435e45a18adbca017ee37403434c5ae /backends/graphics/opengl
parent9844d89231de0fc2234199620390dbd057e79103 (diff)
downloadscummvm-rg350-db2917dde5e8aaf9514e19772b8f0f6646b18deb.tar.gz
scummvm-rg350-db2917dde5e8aaf9514e19772b8f0f6646b18deb.tar.bz2
scummvm-rg350-db2917dde5e8aaf9514e19772b8f0f6646b18deb.zip
OPENGL: Fix texture format for BGR565.
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r--backends/graphics/opengl/opengl-defs.h1
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/backends/graphics/opengl/opengl-defs.h b/backends/graphics/opengl/opengl-defs.h
index 793955c093..4de73d3476 100644
--- a/backends/graphics/opengl/opengl-defs.h
+++ b/backends/graphics/opengl/opengl-defs.h
@@ -202,6 +202,7 @@ typedef GLhandleARB GLshader;
#define GL_UNSIGNED_SHORT_5_6_5 0x8363
#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
#define GL_UNSIGNED_INT_8_8_8_8 0x8035
#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 363fe40b2f..ffc50ec64b 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -1118,8 +1118,8 @@ bool OpenGLGraphicsManager::getGLPixelFormat(const Graphics::PixelFormat &pixelF
return true;
} else if (pixelFormat == Graphics::PixelFormat(2, 5, 6, 5, 0, 0, 5, 11, 0)) { // BGR565
glIntFormat = GL_RGB;
- glFormat = GL_BGR;
- glType = GL_UNSIGNED_SHORT_5_6_5;
+ glFormat = GL_RGB;
+ glType = GL_UNSIGNED_SHORT_5_6_5_REV;
return true;
} else if (pixelFormat == Graphics::PixelFormat(2, 5, 5, 5, 1, 1, 6, 11, 0)) { // BGRA5551
glIntFormat = GL_RGBA;