We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2121cf3 commit b6ebcd8Copy full SHA for b6ebcd8
demosys/effect_templates/sphere_textured/effect.py
@@ -1,6 +1,6 @@
1
+import moderngl as mgl
2
from demosys.effects import effect
3
from demosys import geometry
-from OpenGL import GL
4
from pyrr import matrix44
5
6
@@ -13,9 +13,9 @@ def __init__(self):
13
14
@effect.bind_target
15
def draw(self, time, frametime, target):
16
- GL.glEnable(GL.GL_DEPTH_TEST)
17
- GL.glEnable(GL.GL_CULL_FACE)
18
- GL.glFrontFace(GL.GL_CCW)
+ self.ctx.enable(mgl.DEPTH_TEST)
+ self.ctx.enable(mgl.CULL_FACE)
+ self.ctx.front_face = 'ccw'
19
20
# Rotate and translate
21
m_mv = self.create_transformation(rotation=(time * 1.2, time * 2.1, time * 0.25),
0 commit comments