From: Matthias Braun Date: Sun, 18 May 2008 14:33:04 +0000 (+0000) Subject: OpenGL ES uses glOrthof X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8f4a6fbcec0779b6de56a1eba3713d89d84fb509;p=supertux.git OpenGL ES uses glOrthof SVN-Revision: 5494 --- diff --git a/src/video/gl_lightmap.cpp b/src/video/gl_lightmap.cpp index f37b540bd..012941567 100644 --- a/src/video/gl_lightmap.cpp +++ b/src/video/gl_lightmap.cpp @@ -162,7 +162,11 @@ namespace GL glViewport(0, screen->h - lightmap_height, lightmap_width, lightmap_height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); +#ifdef GL_VERSION_ES_CM_1_0 + glOrthof(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0); +#else glOrtho(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0); +#endif glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -180,7 +184,11 @@ namespace GL glViewport(0, 0, screen->w, screen->h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); +#ifdef GL_VERSION_ES_CM_1_0 + glOrthof(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0); +#else glOrtho(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0); +#endif glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glEnable(GL_BLEND); diff --git a/src/video/gl_renderer.cpp b/src/video/gl_renderer.cpp index b9a23547b..2d928340d 100644 --- a/src/video/gl_renderer.cpp +++ b/src/video/gl_renderer.cpp @@ -198,7 +198,11 @@ Renderer::Renderer() glLoadIdentity(); // logical resolution here not real monitor resolution +#ifdef GL_VERSION_ES_CM_1_0 + glOrthof(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0); +#else glOrtho(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0); +#endif glMatrixMode(GL_MODELVIEW); glLoadIdentity(); @@ -651,7 +655,11 @@ Renderer::apply_config() glMatrixMode(GL_PROJECTION); glLoadIdentity(); - glOrtho(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0); +#ifdef GL_VERSION_ES_CM_1_0 + glOrthof(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0); +#else + glOrtho(0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, -1.0, 1.0); +#endif } } // namespace GL