Fix missing FGLRenderBuffers::IsEnabled checks

This commit is contained in:
Magnus Norddahl 2016-08-06 23:42:37 +02:00 committed by Christoph Oelckers
parent 04c59b434b
commit d4615861ae
2 changed files with 5 additions and 2 deletions

View file

@ -207,7 +207,7 @@ void FGLRenderer::BloomScene()
void FGLRenderer::TonemapScene()
{
if (gl_tonemap == 0)
if (gl_tonemap == 0 || !FGLRenderBuffers::IsEnabled())
return;
FGLPostProcessState savedState;
@ -229,7 +229,7 @@ void FGLRenderer::TonemapScene()
void FGLRenderer::LensDistortScene()
{
if (gl_lens == 0)
if (gl_lens == 0 || !FGLRenderBuffers::IsEnabled())
return;
float k[4] =

View file

@ -141,6 +141,9 @@ void FGLRenderBuffers::DeleteFrameBuffer(GLuint &handle)
void FGLRenderBuffers::Setup(int width, int height)
{
if (!IsEnabled())
return;
int samples = GetCvarSamples();
if (width == mWidth && height == mHeight && mSamples != samples)