Commits

Daniel Pope committed 33bae42

Fix: remove arguments to glPushMatrix/glPopMatrix - it acts on the current matrix and isn't supposed to take a parameter

Comments (0)

Files changed (4)

korovic/camera.py

 
     @contextmanager
     def modelview(self):
-        gl.glPushMatrix(gl.GL_MODELVIEW)
+        gl.glPushMatrix()
         try:
             gl.glMatrixMode(gl.GL_MODELVIEW)
             x, y = self.pos - self.ss
             gl.glTranslatef(-x, -y, 0)
             yield
         finally:
-            gl.glPopMatrix(gl.GL_MODELVIEW)
+            gl.glPopMatrix()

korovic/editor.py

             opacity = 127 if not self.proposed_slot else 255
             position = self.display_offset if not self.proposed_slot else self.proposed_slot[1]
             sopacity = self.component.sprite.opacity
-            gl.glPushMatrix(gl.GL_MODELVIEW)
+            gl.glPushMatrix()
             gl.glTranslatef(position.x, position.y, 0)
             self.component.sprite.opacity = opacity
             self.component.draw()
             self.component.sprite.opacity = sopacity
-            gl.glPopMatrix(gl.GL_MODELVIEW)
+            gl.glPopMatrix()
         else:
             self.component.draw()
         self.component.sprite.color = WHITE

korovic/editor_hud.py

             self.fuellabel.document.text = 'Fuel Capacity: -'
         tr = v(SCREEN_SIZE)
         pos = tr - self.tile_size - v(10, 10)
-        gl.glPushMatrix(gl.GL_MODELVIEW)
+        gl.glPushMatrix()
         gl.glTranslatef(pos.x, pos.y + self.scroll, 0)
         for item in self.items:
             item.draw()
             gl.glTranslatef(0, -self.tile_size.y - 10, 0)
-        gl.glPopMatrix(gl.GL_MODELVIEW)
+        gl.glPopMatrix()
         self.moneylabel.draw()
         self.weightlabel.draw()
         self.fuellabel.draw()
         self.fuellabel.draw()
 
         if self.controllers:
-            gl.glPushMatrix(gl.GL_MODELVIEW)
+            gl.glPushMatrix()
             gl.glTranslatef(SCREEN_SIZE[0] - 74, 10, 0)
             for controller in reversed(self.controllers):
                 controller.draw()
                 gl.glTranslatef(-74, 0, 0)
-            gl.glPopMatrix(gl.GL_MODELVIEW)
+            gl.glPopMatrix()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.