gamnit: cull back faces
authorAlexis Laferrière <alexis.laf@xymus.net>
Mon, 21 Aug 2017 13:22:09 +0000 (09:22 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 29 Aug 2017 14:15:10 +0000 (10:15 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/depth/depth.nit

index 4139949..f6b5592 100644 (file)
@@ -32,6 +32,9 @@ redef class App
                world_camera.reset_height(10.0)
                world_camera.near = 0.1
 
+               # Cull the invisible triangles in the back of the geometries
+               glCullFace gl_BACK
+
                # Prepare programs
                var programs = [versatile_program, normals_program, explosion_program, smoke_program, static_program, selection_program: GamnitProgram]
                for program in programs do