Rename PolyTriangleDrawer to PolyCommandBuffer and make its interface look like one
This commit is contained in:
parent
bb64b178e1
commit
310ef73aa8
7 changed files with 217 additions and 147 deletions
|
|
@ -90,8 +90,6 @@ void PolyFrameBuffer::InitializeState()
|
|||
mViewpoints = new HWViewpointBuffer;
|
||||
mLights = new FLightBuffer();
|
||||
|
||||
PolyTriangleDrawer::SetLightBuffer(GetDrawCommands(), mLightBuffer->Memory());
|
||||
|
||||
CheckCanvas();
|
||||
}
|
||||
|
||||
|
|
@ -110,18 +108,22 @@ void PolyFrameBuffer::CheckCanvas()
|
|||
}
|
||||
}
|
||||
|
||||
const DrawerCommandQueuePtr &PolyFrameBuffer::GetDrawCommands()
|
||||
PolyCommandBuffer *PolyFrameBuffer::GetDrawCommands()
|
||||
{
|
||||
if (!mDrawCommands)
|
||||
mDrawCommands = std::make_shared<DrawerCommandQueue>(&mFrameMemory);
|
||||
return mDrawCommands;
|
||||
{
|
||||
mDrawCommands.reset(new PolyCommandBuffer(&mFrameMemory));
|
||||
mDrawCommands->SetLightBuffer(mLightBuffer->Memory());
|
||||
}
|
||||
return mDrawCommands.get();
|
||||
}
|
||||
|
||||
void PolyFrameBuffer::FlushDrawCommands()
|
||||
{
|
||||
mRenderState->EndRenderPass();
|
||||
if (mDrawCommands)
|
||||
{
|
||||
DrawerThreads::Execute(mDrawCommands);
|
||||
mDrawCommands->Submit();
|
||||
mDrawCommands.reset();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue