- let the light buffer use IDataBuffer as well.

This commit is contained in:
Christoph Oelckers 2018-10-28 15:04:57 +01:00
commit bd7df13200
7 changed files with 58 additions and 100 deletions

View file

@ -200,11 +200,7 @@ bool FGLRenderState::ApplyShader()
matrixToGL(identityMatrix, activeShader->normalmodelmatrix_index);
}
auto index = mLightIndex;
if (index > -1 && GLRenderer->mLights->GetBufferType() == GL_UNIFORM_BUFFER)
{
index = GLRenderer->mLights->BindUBO(index);
}
auto index = GLRenderer->mLights->BindUBO(mLightIndex);
activeShader->muLightIndex.Set(index);
return true;