From 0cf37f2e512b4467b9826d54fff623cf5aee2d30 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 21 May 2014 12:36:29 +0200 Subject: [PATCH] - fixed problem with selecting special shaders. --- src/gl/renderer/gl_renderstate.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gl/renderer/gl_renderstate.cpp b/src/gl/renderer/gl_renderstate.cpp index 4668bf2b78..7f5fd3b0d5 100644 --- a/src/gl/renderer/gl_renderstate.cpp +++ b/src/gl/renderer/gl_renderstate.cpp @@ -129,12 +129,10 @@ bool FRenderState::ApplyShader() { activeShader = GLRenderer->mShaderManager->BindEffect(mSpecialEffect); } - FShader *shd = GLRenderer->mShaderManager->Get(mTextureEnabled? mEffectState : 4); - - if (shd != NULL) + else { - activeShader = shd; - shd->Bind(); + activeShader = GLRenderer->mShaderManager->Get(mTextureEnabled ? mEffectState : 4); + activeShader->Bind(); } int fogset = 0;