This PR clear the drawing buffers *after* selecting the target framebuffer, even when the buffer does not change. This should fix the issue @BlackMinou was having (the color buffer not being cleared) when running Tinks! 3D or https://gitlab.com/xymus/jumpngun.
However, this does not fix a similar issue on my desktop computer and I think an issue remained with the depth buffer on @BlackMinou computer.
Pull-Request: #2480
if display != null then display.close
end
+ redef fun on_resize(display)
+ do
+ super
+
+ world_camera.mvp_matrix_cache = null
+ ui_camera.mvp_matrix_cache = null
+
+ # Update all sprites in the UI
+ for sprite in ui_sprites do sprite.needs_update
+ end
+
redef fun frame_core(display)
do
- # Prepare to draw, clear buffers
- glClear(gl_COLOR_BUFFER_BIT | gl_DEPTH_BUFFER_BIT)
-
# Check errors
var gl_error = glGetError
assert gl_error == gl_NO_ERROR else print_error gl_error