- force render buffers to be active.

For modern hardware the fallback path really makes no sense and this allows to simplify some things quite a bit.
This commit is contained in:
Christoph Oelckers 2018-06-16 09:37:01 +02:00
commit 9ff7e5a4ef
12 changed files with 32 additions and 109 deletions

View file

@ -394,7 +394,7 @@ void FGLRenderer::BlurScene(float gameinfobluramount)
blurAmount = gameinfobluramount;
// if blurAmount == 0 or somehow still returns negative, exit to prevent a crash, clearly we don't want this
if ((blurAmount <= 0.0) || !FGLRenderBuffers::IsEnabled())
if (blurAmount <= 0.0)
return;
FGLDebug::PushGroup("BlurScene");
@ -662,7 +662,7 @@ void FGLRenderer::Flush()
const auto &mSceneViewport = screen->mSceneViewport;
const auto &mScreenViewport = screen->mScreenViewport;
if (stereo3dMode.IsMono() || !FGLRenderBuffers::IsEnabled())
if (stereo3dMode.IsMono())
{
CopyToBackbuffer(nullptr, true);
}
@ -701,30 +701,22 @@ void FGLRenderer::CopyToBackbuffer(const IntRect *bounds, bool applyGamma)
mCustomPostProcessShaders->Run("screen");
FGLDebug::PushGroup("CopyToBackbuffer");
if (FGLRenderBuffers::IsEnabled())
FGLPostProcessState savedState;
mBuffers->BindOutputFB();
IntRect box;
if (bounds)
{
FGLPostProcessState savedState;
mBuffers->BindOutputFB();
IntRect box;
if (bounds)
{
box = *bounds;
}
else
{
ClearBorders();
box = screen->mOutputLetterbox;
}
mBuffers->BindCurrentTexture(0);
DrawPresentTexture(box, applyGamma);
box = *bounds;
}
else if (!bounds)
else
{
FGLPostProcessState savedState;
ClearBorders();
box = screen->mOutputLetterbox;
}
mBuffers->BindCurrentTexture(0);
DrawPresentTexture(box, applyGamma);
FGLDebug::PopGroup();
}