Permalink
Browse files

Optimize buffer clearing slightly.

  • Loading branch information...
gimhael committed Feb 1, 2016
1 parent 947ea44 commit 4afee2592f00031b4ad1adda328ebc377e2aec46
Showing with 4 additions and 8 deletions.
  1. +4 −8 daemon/src/engine/renderer/tr_backend.cpp
@@ -4393,6 +4393,10 @@ static void RB_RenderView()
// clear relevant buffers
clearBits = GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT;
if ( r_clear->integer && !backEnd.viewParms.isPortal ) {
clearBits |= GL_COLOR_BUFFER_BIT;
}
glClear( clearBits );
if ( ( backEnd.refdef.rdflags & RDF_HYPERSPACE ) )
@@ -5372,14 +5376,6 @@ const void *RB_DrawBuffer( const void *data )
GL_DrawBuffer( cmd->buffer );
// clear screen for debugging
if ( r_clear->integer )
{
// GL_ClearColor(1, 0, 0.5, 1);
GL_ClearColor( 0, 0, 0, 1 );
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
}
glState.finishCalled = false;
return ( const void * )( cmd + 1 );
}

0 comments on commit 4afee25

Please sign in to comment.