diff pytouhou/ui/gamerunner.py @ 394:346614f788f1

Replace gl{Vertex,TexCoord,Color}Pointer with the more modern glVertexAttribPointer.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 06 Feb 2013 20:57:16 +0100
parents e1f5dcd4b83e
children 34a91f918e7c
line wrap: on
line diff
--- a/pytouhou/ui/gamerunner.py
+++ b/pytouhou/ui/gamerunner.py
@@ -95,12 +95,13 @@ class GameRunner(pyglet.window.Window, G
 
         # Initialize OpenGL
         glEnable(GL_BLEND)
-        glEnable(GL_TEXTURE_2D)
-        glHint(GL_FOG_HINT, GL_NICEST)
-        glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST)
-        glEnableClientState(GL_COLOR_ARRAY)
-        glEnableClientState(GL_VERTEX_ARRAY)
-        glEnableClientState(GL_TEXTURE_COORD_ARRAY)
+        if self.use_fixed_pipeline:
+            glEnable(GL_TEXTURE_2D)
+            glHint(GL_FOG_HINT, GL_NICEST)
+            glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST)
+            glEnableClientState(GL_COLOR_ARRAY)
+            glEnableClientState(GL_VERTEX_ARRAY)
+            glEnableClientState(GL_TEXTURE_COORD_ARRAY)
 
         self.proj = self.perspective(30, float(self.game.width) / float(self.game.height),
                                      101010101./2010101., 101010101./10101.)