diff options
Diffstat (limited to 'src/rend2/tr_backend.c')
-rw-r--r-- | src/rend2/tr_backend.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/rend2/tr_backend.c b/src/rend2/tr_backend.c index 720cf1e9..678f9aa7 100644 --- a/src/rend2/tr_backend.c +++ b/src/rend2/tr_backend.c @@ -482,9 +482,17 @@ void RB_BeginDrawingView (void) { if (glRefConfig.framebufferObject) { // FIXME: HUGE HACK: render to the screen fbo if we've already postprocessed the frame and aren't drawing more world - if (backEnd.viewParms.targetFbo == tr.renderFbo && backEnd.framePostProcessed && (backEnd.refdef.rdflags & RDF_NOWORLDMODEL)) + // drawing more world check is in case of double renders, such as skyportals + if (backEnd.viewParms.targetFbo == NULL) { - FBO_Bind(tr.screenScratchFbo); + if (backEnd.framePostProcessed && (backEnd.refdef.rdflags & RDF_NOWORLDMODEL)) + { + FBO_Bind(tr.screenScratchFbo); + } + else + { + FBO_Bind(tr.renderFbo); + } } else { @@ -949,7 +957,7 @@ void RE_StretchRaw (int x, int y, int w, int h, int cols, int rows, const byte * } // FIXME: HUGE hack - if (glRefConfig.framebufferObject && !glState.currentFBO) + if (glRefConfig.framebufferObject) { if (backEnd.framePostProcessed) { @@ -1092,7 +1100,7 @@ const void *RB_StretchPic ( const void *data ) { cmd = (const stretchPicCommand_t *)data; // FIXME: HUGE hack - if (glRefConfig.framebufferObject && !glState.currentFBO) + if (glRefConfig.framebufferObject) { if (backEnd.framePostProcessed) { @@ -1570,7 +1578,7 @@ const void *RB_ClearDepth(const void *data) if (glRefConfig.framebufferObject) { - if (backEnd.framePostProcessed && (backEnd.refdef.rdflags & RDF_NOWORLDMODEL)) + if (backEnd.framePostProcessed) { FBO_Bind(tr.screenScratchFbo); } |