diff options
author | Johannes Schickel | 2014-02-12 18:06:29 +0100 |
---|---|---|
committer | Johannes Schickel | 2014-02-12 18:06:29 +0100 |
commit | 2cab30ee80a7611945ac5e9260c63d6b86f658cf (patch) | |
tree | e06e671896c02fa356c62e71e66b9c4bc67b007c /backends | |
parent | ac5907a8046cd7ab66e43ac7e7e2d39863984917 (diff) | |
download | scummvm-rg350-2cab30ee80a7611945ac5e9260c63d6b86f658cf.tar.gz scummvm-rg350-2cab30ee80a7611945ac5e9260c63d6b86f658cf.tar.bz2 scummvm-rg350-2cab30ee80a7611945ac5e9260c63d6b86f658cf.zip |
OPENGL: Move RGBA8888 (logical layout) to OpenGL specific formats.
The reason here is that GL_UNSIGNED_INT_8_8_8_8 is not supported by the GLES
standard. Thus we cannot use it outside OpenGL specific code paths.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index dfba14abe6..d7d37a2025 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -918,12 +918,7 @@ Texture *OpenGLGraphicsManager::createTexture(const Graphics::PixelFormat &forma } bool OpenGLGraphicsManager::getGLPixelFormat(const Graphics::PixelFormat &pixelFormat, GLenum &glIntFormat, GLenum &glFormat, GLenum &glType) const { - if (pixelFormat == Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0)) { // RGBA8888 - glIntFormat = GL_RGBA; - glFormat = GL_RGBA; - glType = GL_UNSIGNED_INT_8_8_8_8; - return true; - } else if (pixelFormat == Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0)) { // RGB565 + if (pixelFormat == Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0)) { // RGB565 glIntFormat = GL_RGB; glFormat = GL_RGB; glType = GL_UNSIGNED_SHORT_5_6_5; @@ -939,6 +934,11 @@ bool OpenGLGraphicsManager::getGLPixelFormat(const Graphics::PixelFormat &pixelF glType = GL_UNSIGNED_SHORT_4_4_4_4; return true; #ifndef USE_GLES + } else if (pixelFormat == Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0)) { // RGBA8888 + glIntFormat = GL_RGBA; + glFormat = GL_RGBA; + glType = GL_UNSIGNED_INT_8_8_8_8; + return true; } 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. |