From 37166b5faf9a8ba6a49ca4f30fa5072989554902 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 31 Oct 2018 12:48:09 +0100 Subject: [PATCH] - fixed missing binding of the light buffer. I thought this wasn't needed but apparently the buffer refactoring caused this not to be done automatically anymore. Best have it once at the start of each frame where the cost is negligible. --- src/hwrenderer/dynlights/hw_lightbuffer.h | 7 +++++++ src/hwrenderer/scene/hw_drawinfo.cpp | 1 + 2 files changed, 8 insertions(+) diff --git a/src/hwrenderer/dynlights/hw_lightbuffer.h b/src/hwrenderer/dynlights/hw_lightbuffer.h index f47595eb14..8b3e182cb4 100644 --- a/src/hwrenderer/dynlights/hw_lightbuffer.h +++ b/src/hwrenderer/dynlights/hw_lightbuffer.h @@ -54,6 +54,13 @@ public: } return index; } + + // The parameter is a reminder for Vulkan. + void BindBase() + { + mBuffer->BindBase(); + } + }; int gl_SetDynModelLight(AActor *self, int dynlightindex); diff --git a/src/hwrenderer/scene/hw_drawinfo.cpp b/src/hwrenderer/scene/hw_drawinfo.cpp index 1e5e09ba03..d781fc64d9 100644 --- a/src/hwrenderer/scene/hw_drawinfo.cpp +++ b/src/hwrenderer/scene/hw_drawinfo.cpp @@ -484,6 +484,7 @@ void HWDrawInfo::RenderScene(FRenderState &state) state.SetDepthMask(true); + screen->mLights->BindBase(); state.EnableFog(true); state.SetRenderStyle(STYLE_Source);