[Scummvm-cvs-logs] SF.net SVN: scummvm:[51552] scummvm/branches/gsoc2010-opengl/backends/ graphics/opengl/opengl-graphics.cpp
vgvgf at users.sourceforge.net
vgvgf at users.sourceforge.net
Sat Jul 31 22:58:14 CEST 2010
Revision: 51552
http://scummvm.svn.sourceforge.net/scummvm/?rev=51552&view=rev
Author: vgvgf
Date: 2010-07-31 20:58:14 +0000 (Sat, 31 Jul 2010)
Log Message:
-----------
OPENGL: For GLES, add glOrthox and do not use GL_BGR.
Modified Paths:
--------------
scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.cpp
Modified: scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.cpp
===================================================================
--- scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.cpp 2010-07-31 19:57:54 UTC (rev 51551)
+++ scummvm/branches/gsoc2010-opengl/backends/graphics/opengl/opengl-graphics.cpp 2010-07-31 20:58:14 UTC (rev 51552)
@@ -987,7 +987,11 @@
// 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 @@
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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list