Skip to content

Commit

Permalink
- fixed crash with GL 3.x and fixed colormap active.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
coelckers committed Jun 13, 2018
1 parent 2fb1274 commit 04a0e52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gl/scene/gl_flats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 04a0e52

Please sign in to comment.