+ # Cull the invisible triangles in the back of the geometries
+ glCullFace gl_BACK
+
+ # Prepare programs
+ var programs = [blinn_phong_program, normals_program, explosion_program, smoke_program, static_program, selection_program: GamnitProgram]
+ for program in programs do
+ program.compile_and_link
+ var gamnit_error = program.error
+ assert gamnit_error == null else print_error gamnit_error
+ end
+ end
+
+ redef fun frame_core_draw(display) do frame_core_depth display
+
+ # Draw all elements of `actors` and then call `frame_core_flat`
+ protected fun frame_core_depth(display: GamnitDisplay)
+ do
+ frame_core_depth_clock.lapse
+
+ # Compute shadows
+ if light isa LightCastingShadows then
+ frame_core_shadow_prep display
+ perfs["gamnit depth shadows"].add frame_core_depth_clock.lapse
+ end