aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordi Vilalta Prat2010-12-03 19:43:27 +0000
committerJordi Vilalta Prat2010-12-03 19:43:27 +0000
commit5884f5a7ac1ca83e702f44cd4ecfc56dcfaf2490 (patch)
treeadd89b5fcb907c4ba27ba3dbb0a532105c61b3e7
parentf1d961a35eadec6a76c0423563e379d830f68002 (diff)
downloadscummvm-rg350-5884f5a7ac1ca83e702f44cd4ecfc56dcfaf2490.tar.gz
scummvm-rg350-5884f5a7ac1ca83e702f44cd4ecfc56dcfaf2490.tar.bz2
scummvm-rg350-5884f5a7ac1ca83e702f44cd4ecfc56dcfaf2490.zip
OPENGLES: Fix the projection matrix and the includes.
svn-id: r54756
-rw-r--r--backends/graphics/opengl/glerrorcheck.cpp6
-rw-r--r--backends/graphics/opengl/gltexture.h6
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp2
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.h1
4 files changed, 7 insertions, 8 deletions
diff --git a/backends/graphics/opengl/glerrorcheck.cpp b/backends/graphics/opengl/glerrorcheck.cpp
index 3abcc27eed..9989a4cf9d 100644
--- a/backends/graphics/opengl/glerrorcheck.cpp
+++ b/backends/graphics/opengl/glerrorcheck.cpp
@@ -39,10 +39,10 @@
#undef ARRAYSIZE
#endif
-#ifdef MACOSX
-#include <OpenGL/gl.h>
-#elif defined(USE_GLES)
+#if defined(USE_GLES)
#include <GLES/gl.h>
+#elif defined(MACOSX)
+#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index 92bd0ec8d9..e7951a0c96 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -32,10 +32,10 @@
#undef ARRAYSIZE
#endif
-#if defined(SDL_BACKEND)
-#include <SDL_opengl.h>
-#elif defined(USE_GLES)
+#if defined(USE_GLES)
#include <GLES/gl.h>
+#elif defined(SDL_BACKEND)
+#include <SDL_opengl.h>
#else
#include <GL/gl.h>
#endif
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 35dd9a6046..e2f8dd4d30 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -1043,7 +1043,7 @@ void OpenGLGraphicsManager::initGL() {
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();
+ glOrthof(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
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.h b/backends/graphics/openglsdl/openglsdl-graphics.h
index 548988e43a..d39c0814de 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.h
+++ b/backends/graphics/openglsdl/openglsdl-graphics.h
@@ -30,7 +30,6 @@
#if defined(ARRAYSIZE) && !defined(_WINDOWS_)
#undef ARRAYSIZE
#endif
-#include <SDL_opengl.h>
#include "backends/graphics/opengl/opengl-graphics.h"