Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
assert gamnit_error == null else print_error gamnit_error
end
- # Draw all element in `actors`
- redef fun frame_core_draw(display)
- do
- super
+ 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
# Update cameras on both our programs
versatile_program.use
versatile_program.mvp.uniform world_camera.mvp_matrix
leaf.material.draw(actor, leaf)
end
end
+
+ frame_core_flat display
end
end
assert gl_error == gl_NO_ERROR else print gl_error
end
+ # Draw the whole screen, all `glDraw...` calls should be executed here
+ protected fun frame_core_draw(display: GamnitDisplay) do frame_core_flat display
+
# Draw sprites in `sprites` and `ui_sprites`
- protected fun frame_core_draw(display: GamnitDisplay)
+ protected fun frame_core_flat(display: GamnitDisplay)
do
simple_2d_program.use