- hook up dynamic lights

This commit is contained in:
Magnus Norddahl 2019-07-25 04:19:05 +02:00
commit 97a4f25771
7 changed files with 100 additions and 11 deletions

View file

@ -100,6 +100,8 @@ void PolyFrameBuffer::InitializeState()
mViewpoints = new HWViewpointBuffer;
mLights = new FLightBuffer();
PolyTriangleDrawer::SetLightBuffer(GetDrawCommands(), mLightBuffer->Memory());
CheckCanvas();
}
@ -485,7 +487,10 @@ IIndexBuffer *PolyFrameBuffer::CreateIndexBuffer()
IDataBuffer *PolyFrameBuffer::CreateDataBuffer(int bindingpoint, bool ssbo, bool needsresize)
{
return new PolyDataBuffer(bindingpoint, ssbo, needsresize);
IDataBuffer *buffer = new PolyDataBuffer(bindingpoint, ssbo, needsresize);
if (bindingpoint == LIGHTBUF_BINDINGPOINT)
mLightBuffer = buffer;
return buffer;
}
void PolyFrameBuffer::SetTextureFilterMode()