summaryrefslogtreecommitdiff
path: root/src/rend2/tr_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rend2/tr_cmds.c')
-rw-r--r--src/rend2/tr_cmds.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/rend2/tr_cmds.c b/src/rend2/tr_cmds.c
index 9945da3f..2f67d221 100644
--- a/src/rend2/tr_cmds.c
+++ b/src/rend2/tr_cmds.c
@@ -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;
-
- switch(i)
- {
- case 0:
- FBO_Bind(tr.renderFbo);
- break;
-
- case 1:
- FBO_Bind(tr.msaaResolveFbo);
- break;
+ FBO_Bind(tr.msaaResolveFbo);
+ qglClear(GL_COLOR_BUFFER_BIT);
+ }
- 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);
}