Fix FBO_*() usage when framebuffers are unavailable or undesired.
This commit is contained in:
parent
c4aa3cf8c0
commit
5cbe7888f8
7 changed files with 43 additions and 36 deletions
|
@ -498,12 +498,7 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
|
|||
backEnd.colorMask[2] = GL_FALSE;
|
||||
backEnd.colorMask[3] = GL_FALSE;
|
||||
qglClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
qglDrawBuffer(GL_FRONT);
|
||||
qglClear(GL_COLOR_BUFFER_BIT);
|
||||
qglDrawBuffer(GL_BACK);
|
||||
qglClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
|
||||
if (glRefConfig.framebufferObject)
|
||||
{
|
||||
// clear all framebuffers
|
||||
|
@ -530,15 +525,17 @@ void RE_BeginFrame( stereoFrame_t stereoFrame ) {
|
|||
break;
|
||||
}
|
||||
|
||||
qglDrawBuffer(GL_FRONT);
|
||||
qglClear(GL_COLOR_BUFFER_BIT);
|
||||
qglDrawBuffer(GL_BACK);
|
||||
qglClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
FBO_Bind(NULL);
|
||||
}
|
||||
|
||||
qglDrawBuffer(GL_FRONT);
|
||||
qglClear(GL_COLOR_BUFFER_BIT);
|
||||
qglDrawBuffer(GL_BACK);
|
||||
qglClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
r_anaglyphMode->modified = qfalse;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue