[Supertux-Commit] r5494 - trunk/supertux/src/video

matzeb at millhouse.dreamhost.com matzeb at millhouse.dreamhost.com
Sun May 18 07:33:05 PDT 2008


Author: matzeb
Date: 2008-05-18 07:33:04 -0700 (Sun, 18 May 2008)
New Revision: 5494

Modified:
   trunk/supertux/src/video/gl_lightmap.cpp
   trunk/supertux/src/video/gl_renderer.cpp
Log:
OpenGL ES uses glOrthof

Modified: trunk/supertux/src/video/gl_lightmap.cpp
===================================================================
--- trunk/supertux/src/video/gl_lightmap.cpp	2008-05-18 14:26:06 UTC (rev 5493)
+++ trunk/supertux/src/video/gl_lightmap.cpp	2008-05-18 14:33:04 UTC (rev 5494)
@@ -162,7 +162,11 @@
     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 @@
     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);

Modified: trunk/supertux/src/video/gl_renderer.cpp
===================================================================
--- trunk/supertux/src/video/gl_renderer.cpp	2008-05-18 14:26:06 UTC (rev 5493)
+++ trunk/supertux/src/video/gl_renderer.cpp	2008-05-18 14:33:04 UTC (rev 5494)
@@ -198,7 +198,11 @@
   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 @@
 
   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




More information about the Supertux-Commit mailing list