OPENGLES: Fix the projection matrix and the includes.

svn-id: r54756
This commit is contained in:
Jordi Vilalta Prat 2010-12-03 19:43:27 +00:00
parent f1d961a35e
commit 5884f5a7ac
4 changed files with 7 additions and 8 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -30,7 +30,6 @@
#if defined(ARRAYSIZE) && !defined(_WINDOWS_)
#undef ARRAYSIZE
#endif
#include <SDL_opengl.h>
#include "backends/graphics/opengl/opengl-graphics.h"