From 90ab0223a6cf11e3e37b4e57c0fbef90d445eef7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 3 Sep 2016 00:36:23 +0200 Subject: [PATCH] - handle colormap parameter reset when renderbuffers are toggled. --- src/gl/renderer/gl_renderbuffers.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gl/renderer/gl_renderbuffers.cpp b/src/gl/renderer/gl_renderbuffers.cpp index 5fe2f5b3a..f66ea1354 100644 --- a/src/gl/renderer/gl_renderbuffers.cpp +++ b/src/gl/renderer/gl_renderbuffers.cpp @@ -55,14 +55,7 @@ #include "doomerrors.h" CVAR(Int, gl_multisample, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); -CUSTOM_CVAR(Bool, gl_renderbuffers, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) -{ - // this CVAR alters some fixed colormap related settings - if (GLRenderer != nullptr && GLRenderer->mShaderManager != nullptr) - { - //GLRenderer->mShaderManager->ResetFixedColormap(); - } -} +CVAR(Bool, gl_renderbuffers, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) //========================================================================== // @@ -161,6 +154,7 @@ bool FGLRenderBuffers::Setup(int width, int height, int sceneWidth, int sceneHei if (BuffersActive) glBindFramebuffer(GL_FRAMEBUFFER, mOutputFB); BuffersActive = gl_renderbuffers; + GLRenderer->mShaderManager->ResetFixedColormap(); } if (!IsEnabled())