diff options
author | Alejandro Marzini | 2010-07-31 20:58:14 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-31 20:58:14 +0000 |
commit | c93adcbd298b65fff72d3991d2690379c2ba8a88 (patch) | |
tree | e3bd725057e36d3473e0c8721224c4d0bbc09fdb /backends/graphics/opengl | |
parent | 6d6756b46ad68294e93438f18f082e346ff775f9 (diff) | |
download | scummvm-rg350-c93adcbd298b65fff72d3991d2690379c2ba8a88.tar.gz scummvm-rg350-c93adcbd298b65fff72d3991d2690379c2ba8a88.tar.bz2 scummvm-rg350-c93adcbd298b65fff72d3991d2690379c2ba8a88.zip |
OPENGL: For GLES, add glOrthox and do not use GL_BGR.
svn-id: r51552
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 7c47d5b967..3b04be600d 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -987,7 +987,11 @@ void OpenGLGraphicsManager::initGL() { // Setup coordinates system glMatrixMode(GL_PROJECTION); CHECK_GL_ERROR(); glLoadIdentity(); CHECK_GL_ERROR(); +#ifdef USE_GLES + glOrthox(0, _videoMode.hardwareWidth, _videoMode.hardwareHeight, 0, -1, 1); CHECK_GL_ERROR(); +#else glOrtho(0, _videoMode.hardwareWidth, _videoMode.hardwareHeight, 0, -1, 1); CHECK_GL_ERROR(); +#endif glMatrixMode(GL_MODELVIEW); CHECK_GL_ERROR(); glLoadIdentity(); CHECK_GL_ERROR(); } @@ -1217,11 +1221,15 @@ bool OpenGLGraphicsManager::saveScreenshot(const char *filename) { uint8 *pixels = new uint8[width * height * 3]; // Get pixel data from opengl buffer +#ifdef USE_GLES + glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels); CHECK_GL_ERROR(); +#else if (_formatBGR) { glReadPixels(0, 0, width, height, GL_BGR, GL_UNSIGNED_BYTE, pixels); CHECK_GL_ERROR(); } else { glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels); CHECK_GL_ERROR(); } +#endif // Open file Common::DumpFile out; |