From 6cd8b1b3eb3107f33647585fe5f9281c7e181a78 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 29 Apr 2018 17:36:51 +0200 Subject: [PATCH] - With dynamic light data creation being done in the preparation pass, the light buffer must be mapped while this is running for it to work on older hardware. --- src/gl/scene/gl_scene.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 9314e7d92f..1997344d51 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -249,6 +249,8 @@ void GLSceneDrawer::CreateScene() for(auto p : level.portalGroups) p->glportal = nullptr; Bsp.Clock(); GLRenderer->mVBO->Map(); + GLRenderer->mLights->Begin(); + SetView(); validcount++; // used for processing sidedefs only once by the renderer. @@ -269,6 +271,7 @@ void GLSceneDrawer::CreateScene() gl_drawinfo->HandleMissingTextures(in_area); // Missing upper/lower textures gl_drawinfo->HandleHackedSubsectors(); // open sector hacks for deep water gl_drawinfo->ProcessSectorStacks(in_area); // merge visplanes of sector stacks + GLRenderer->mLights->Finish(); GLRenderer->mVBO->Unmap(); ProcessAll.Unclock();