From 20e84fff5af775f55ec2c38045fc2fd645f18da7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 12 Jun 2018 17:55:20 +0200 Subject: [PATCH] - 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. --- src/gl/scene/gl_flats.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index 2fe139c62..4533041cb 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -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));