- fixed crash with GL 3.x and fixed colormap active.

This must skip all light processing. On GL 4.5 it will only collect useless data but on GL 3.x it will run into an unmapped buffer situation.
This commit is contained in:
Christoph Oelckers 2018-06-12 17:55:20 +02:00
parent 6fced1865f
commit 20e84fff5a
1 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,7 @@
void FDrawInfo::SetupSubsectorLights(GLFlat *flat, int pass, subsector_t * sub, int *dli)
{
if (FixedColormap != CM_DEFAULT) return;
if (dli != NULL && *dli != -1)
{
gl_RenderState.ApplyLightIndex(GLRenderer->mLights->GetIndex(*dli));
@ -84,6 +85,7 @@ void FDrawInfo::SetupSubsectorLights(GLFlat *flat, int pass, subsector_t * sub,
void FDrawInfo::SetupSectorLights(GLFlat *flat, int pass, int *dli)
{
if (FixedColormap != CM_DEFAULT) return;
if (dli != NULL && *dli != -1)
{
gl_RenderState.ApplyLightIndex(GLRenderer->mLights->GetIndex(*dli));