From 04a0e52a9772b8dfaf1ae5b129f1fa4a09a87db4 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 2fe139c6277..4533041cb9f 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));