mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-24 13:01:48 +00:00
- fixed: The DrawBlend call in the postprocessing case was using the global 'viewsector' variable directly.
As with the Stereo3D stuff, this cannot be done because recursive processing of portals will change it. Instead the local copy has to be used here, just like the EndDrawScene call already did.
This commit is contained in:
parent
108dcf122a
commit
74ede7bb4e
1 changed files with 5 additions and 5 deletions
|
@ -771,7 +771,7 @@ void FGLRenderer::SetFixedColormap (player_t *player)
|
|||
|
||||
sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, float fov, float ratio, float fovratio, bool mainview, bool toscreen)
|
||||
{
|
||||
sector_t * retval;
|
||||
sector_t * lviewsector;
|
||||
mSceneClearColor[0] = 0.0f;
|
||||
mSceneClearColor[1] = 0.0f;
|
||||
mSceneClearColor[2] = 0.0f;
|
||||
|
@ -818,7 +818,7 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo
|
|||
}
|
||||
|
||||
// 'viewsector' will not survive the rendering so it cannot be used anymore below.
|
||||
retval = viewsector;
|
||||
lviewsector = viewsector;
|
||||
|
||||
// Render (potentially) multiple views for stereo 3d
|
||||
float viewShift[3];
|
||||
|
@ -848,7 +848,7 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo
|
|||
clipper.SafeAddClipRangeRealAngles(ViewAngle.BAMs() + a1, ViewAngle.BAMs() - a1);
|
||||
|
||||
ProcessScene(toscreen);
|
||||
if (mainview && toscreen) EndDrawScene(retval); // do not call this for camera textures.
|
||||
if (mainview && toscreen) EndDrawScene(lviewsector); // do not call this for camera textures.
|
||||
if (mainview && FGLRenderBuffers::IsEnabled())
|
||||
{
|
||||
mBuffers->BlitSceneToTexture();
|
||||
|
@ -860,7 +860,7 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo
|
|||
// This should be done after postprocessing, not before.
|
||||
mBuffers->BindCurrentFB();
|
||||
glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height);
|
||||
DrawBlend(viewsector);
|
||||
DrawBlend(lviewsector);
|
||||
}
|
||||
mDrawingScene2D = false;
|
||||
eye->TearDown();
|
||||
|
@ -869,7 +869,7 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo
|
|||
|
||||
gl_frameCount++; // This counter must be increased right before the interpolations are restored.
|
||||
interpolator.RestoreInterpolations ();
|
||||
return retval;
|
||||
return lviewsector;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue