Skip to content

Commit 8bf8a7d

Browse files
committed
Clean up raymarching_simple
1 parent b6ebcd8 commit 8bf8a7d

File tree

1 file changed

+3
-2
lines changed
  • demosys/effect_templates/raymarching_simple

1 file changed

+3
-2
lines changed

demosys/effect_templates/raymarching_simple/effect.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import moderngl as mgl
2+
13
from demosys.effects import effect
24
from demosys import geometry
35
from pyrr import Vector3
4-
from OpenGL import GL
56
import math
67

78

@@ -15,7 +16,7 @@ def __init__(self):
1516

1617
@effect.bind_target
1718
def draw(self, time, frametime, target):
18-
GL.glEnable(GL.GL_DEPTH_TEST)
19+
self.ctx.enable(mgl.DEPTH_TEST)
1920

2021
# Rotate plane 90 degrees, and move plane back so it will fit correctly on to screen
2122
backoff = math.tan(math.radians(self.sys_camera.projection.fov / 2)) * (self.window_width / 2)

0 commit comments

Comments
 (0)