Make software overbright optional (cvar r_softOverbright) and reduce the number of FBOs and FBO blits when able.

This commit is contained in:
James Canete 2012-11-20 03:34:16 +00:00
parent 1f8db4c14a
commit 467619c034
8 changed files with 166 additions and 201 deletions

View file

@ -502,29 +502,21 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
if (glRefConfig.framebufferObject)
{
// clear all framebuffers
// FIXME: must be a better way to do this
int i;
for (i = 0; i < 3; i++)
if (tr.msaaResolveFbo)
{
if (i == 1 && !tr.msaaResolveFbo)
continue;
FBO_Bind(tr.msaaResolveFbo);
qglClear(GL_COLOR_BUFFER_BIT);
}
switch(i)
{
case 0:
FBO_Bind(tr.renderFbo);
break;
case 1:
FBO_Bind(tr.msaaResolveFbo);
break;
case 2:
FBO_Bind(tr.screenScratchFbo);
break;
}
if (tr.renderFbo)
{
FBO_Bind(tr.renderFbo);
qglClear(GL_COLOR_BUFFER_BIT);
}
if (tr.screenScratchFbo)
{
FBO_Bind(tr.screenScratchFbo);
qglClear(GL_COLOR_BUFFER_BIT);
}