Fix light binding when using pipeline buffer on OpenGL

This commit is contained in:
Emile Belanger 2021-06-14 18:22:42 +01:00
parent 1457194e01
commit 146e388430
1 changed files with 1 additions and 1 deletions

View File

@ -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<GLDataBuffer*>(screen->mLights->GetBuffer())->BindRange(nullptr, start, size);