2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 01:07:43 +00:00

Buffer pool intrinsic garbage collection

This commit is contained in:
Jack Andersen
2016-12-10 20:17:49 -10:00
parent 0384119bd4
commit db542135df
6 changed files with 168 additions and 98 deletions

View File

@@ -373,14 +373,18 @@ void View::draw(boo::IGraphicsCommandQueue* gfxQ)
}
}
void View::_commitResources(ViewResources& res, const boo::FactoryCommitFunc& commitFunc)
{
m_gfxData = res.m_factory->commitTransaction(commitFunc);
}
void View::commitResources(ViewResources& res, const boo::FactoryCommitFunc& commitFunc)
{
if (m_gfxData)
Log.report(logvisor::Fatal, "multiple resource commits not allowed");
m_gfxData = res.m_factory->commitTransaction(commitFunc);
_commitResources(res, commitFunc);
}
void View::VertexBufferBindingSolid::init(boo::IGraphicsDataFactory::Context& ctx,
ViewResources& res, size_t count,
const UniformBufferPool<ViewBlock>::Token& viewBlockBuf)