Skip to content

Commit

Permalink
OpenGL2: Fix r_clear when using HDR/FB-MSAA
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed Nov 19, 2023
1 parent a81df34 commit f7c12a1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/renderergl2/tr_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,13 @@ const void *RB_DrawBuffer( const void *data ) {
if ( r_clear->integer ) {
qglClearColor( 1, 0, 0.5, 1 );
qglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

if (glRefConfig.framebufferObject && tr.renderFbo) {
FBO_Bind(tr.renderFbo);

qglClearColor( 1, 0, 0.5, 1 );
qglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
}
}

return (const void *)(cmd + 1);
Expand Down

0 comments on commit f7c12a1

Please sign in to comment.