Skip to content

Commit 40481c7

Browse files
committed
cube_simple effect modified to moderngl
1 parent f815ec8 commit 40481c7

File tree

1 file changed

+2
-1
lines changed
  • demosys/effect_templates/cube_simple

1 file changed

+2
-1
lines changed

demosys/effect_templates/cube_simple/effect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import moderngl as mgl
12
from demosys.effects import effect
23
from demosys import geometry
34
from OpenGL import GL
@@ -12,7 +13,7 @@ def __init__(self):
1213

1314
@effect.bind_target
1415
def draw(self, time, frametime, target):
15-
GL.glEnable(GL.GL_DEPTH_TEST)
16+
self.ctx.enable(mgl.DEPTH_TEST)
1617

1718
# Rotate and translate
1819
m_mv = self.create_transformation(rotation=(time * 1.2, time * 2.1, time * 0.25),

0 commit comments

Comments
 (0)