- fixed: Made shader targets not case sensitive

This commit is contained in:
Rachael Alexanderson 2017-11-19 04:40:16 -05:00
parent c2b4efbea0
commit 2c24d2e047
2 changed files with 9 additions and 1 deletions

View File

@ -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_COLOR, mColor.vec);
glVertexAttrib4fv(VATTR_NORMAL, mNormal.vec); glVertexAttrib4fv(VATTR_NORMAL, mNormal.vec);
//activeShader->muObjectColor2.Set(mObjectColor2); //activeShader->muObjectColor2.Set(mObjectColor2);
@ -367,7 +373,8 @@ void FRenderState::ApplyLightIndex(int index)
{ {
index = GLRenderer->mLights->BindUBO(index); index = GLRenderer->mLights->BindUBO(index);
} }
activeShader->muLightIndex.Set(index); if (activeShader)
activeShader->muLightIndex.Set(index);
} }
} }

View File

@ -682,6 +682,7 @@ void gl_ParseHardwareShader(FScanner &sc, int deflump)
PostProcessShader shaderdesc; PostProcessShader shaderdesc;
shaderdesc.Target = sc.String; shaderdesc.Target = sc.String;
shaderdesc.Target.ToLower();
bool validTarget = false; bool validTarget = false;
if (sc.Compare("beforebloom")) validTarget = true; if (sc.Compare("beforebloom")) validTarget = true;