Skip to content

Commit

Permalink
glClear the FBO in debug builds
Browse files Browse the repository at this point in the history
Prior to the 'Get rid of vbo flipping' commit, this would cause
every second frame to be very obviously broken on certain drivers.
This ensures that if we regress the render target, I'll see it in
a debug build.
  • Loading branch information
Nopey committed Nov 9, 2024
1 parent fb56f35 commit 5359edd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/video/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ void video_render_finish_offscreen(void) {
activate_program(g_video_state.palette_prog_id);
render_target_activate(g_video_state.target);

#if DEBUGMODE
glClear(GL_COLOR_BUFFER_BIT);
#endif

object_array_blend_mode mode;
while(object_array_get_batch(g_video_state.objects, &batch, &mode)) {
video_set_blend_mode(mode);
Expand Down

0 comments on commit 5359edd

Please sign in to comment.