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

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);