From 2c24d2e047772e8becd344b9152abaaac8c39da3 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 19 Nov 2017 04:40:16 -0500 Subject: [PATCH] - fixed: Made shader targets not case sensitive --- src/gl/renderer/gl_renderstate.cpp | 9 ++++++++- src/gl/shaders/gl_shader.cpp | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gl/renderer/gl_renderstate.cpp b/src/gl/renderer/gl_renderstate.cpp index 67c9c21fa..887de5276 100644 --- a/src/gl/renderer/gl_renderstate.cpp +++ b/src/gl/renderer/gl_renderstate.cpp @@ -143,6 +143,12 @@ bool FRenderState::ApplyShader() } } + if (!activeShader) + { + assert(0); // We should not be getting to this point! + return false; + } + glVertexAttrib4fv(VATTR_COLOR, mColor.vec); glVertexAttrib4fv(VATTR_NORMAL, mNormal.vec); //activeShader->muObjectColor2.Set(mObjectColor2); @@ -367,7 +373,8 @@ void FRenderState::ApplyLightIndex(int index) { index = GLRenderer->mLights->BindUBO(index); } - activeShader->muLightIndex.Set(index); + if (activeShader) + activeShader->muLightIndex.Set(index); } } diff --git a/src/gl/shaders/gl_shader.cpp b/src/gl/shaders/gl_shader.cpp index 41b6c18a1..6c9ee416d 100644 --- a/src/gl/shaders/gl_shader.cpp +++ b/src/gl/shaders/gl_shader.cpp @@ -682,6 +682,7 @@ void gl_ParseHardwareShader(FScanner &sc, int deflump) PostProcessShader shaderdesc; shaderdesc.Target = sc.String; + shaderdesc.Target.ToLower(); bool validTarget = false; if (sc.Compare("beforebloom")) validTarget = true;