From 146e388430ece26258dba6d32b61ff3f5431a905 Mon Sep 17 00:00:00 2001 From: Emile Belanger Date: Mon, 14 Jun 2021 18:22:42 +0100 Subject: [PATCH] Fix light binding when using pipeline buffer on OpenGL --- src/common/rendering/gl/gl_renderstate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/rendering/gl/gl_renderstate.cpp b/src/common/rendering/gl/gl_renderstate.cpp index 64e8cc4d1..b8272e58d 100644 --- a/src/common/rendering/gl/gl_renderstate.cpp +++ b/src/common/rendering/gl/gl_renderstate.cpp @@ -204,7 +204,7 @@ bool FGLRenderState::ApplyShader() size_t start, size; index = screen->mLights->GetBinding(index, &start, &size); - if (start != mLastMappedLightIndex) + if (start != mLastMappedLightIndex || screen->mPipelineNbr > 1) // If multiple buffers always bind { mLastMappedLightIndex = start; static_cast(screen->mLights->GetBuffer())->BindRange(nullptr, start, size);