Fixed incorrect offscreen rendering of player's blend

This commit is contained in:
alexey.lysiuk 2017-02-05 11:26:17 +02:00 committed by Christoph Oelckers
parent 72810c969d
commit 481bddf628

View file

@ -866,6 +866,14 @@ sector_t * FGLRenderer::RenderViewpoint (AActor * camera, GL_IRECT * bounds, flo
// This should be done after postprocessing, not before. // This should be done after postprocessing, not before.
mBuffers->BindCurrentFB(); mBuffers->BindCurrentFB();
glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height); glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height);
if (!toscreen)
{
gl_RenderState.mViewMatrix.loadIdentity();
gl_RenderState.mProjectionMatrix.ortho(mScreenViewport.left, mScreenViewport.width, mScreenViewport.height, mScreenViewport.top, -1.0f, 1.0f);
gl_RenderState.ApplyMatrices();
}
DrawBlend(lviewsector); DrawBlend(lviewsector);
} }
mDrawingScene2D = false; mDrawingScene2D = false;