Skip to content
This repository has been archived by the owner on Jul 24, 2022. It is now read-only.

Commit

Permalink
Fix light binding when using pipeline buffer on OpenGL
Browse files Browse the repository at this point in the history
  • Loading branch information
emileb committed Jul 26, 2021
1 parent 1457194 commit 146e388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/rendering/gl/gl_renderstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 146e388

Please sign in to comment.