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

Buffer pool refactor

This commit is contained in:
Jack Andersen
2017-01-28 17:57:48 -10:00
parent 49e4446d4b
commit d618264e26
24 changed files with 56 additions and 56 deletions

View File

@@ -28,8 +28,8 @@ SplitView::SplitView(ViewResources& res, View& parentView, ISplitSpaceController
commitResources(res, [&](boo::IGraphicsDataFactory::Context& ctx) -> bool
{
buildResources(ctx, res);
m_splitBlockBuf.emplace(res.m_viewRes.m_bufPool.allocateBlock(res.m_factory));
m_splitVertsBinding.init(ctx, res, 4, *m_splitBlockBuf, res.m_splitRes.m_shadingTex);
m_splitBlockBuf = res.m_viewRes.m_bufPool.allocateBlock(res.m_factory);
m_splitVertsBinding.init(ctx, res, 4, m_splitBlockBuf, res.m_splitRes.m_shadingTex);
return true;
});
}
@@ -476,7 +476,7 @@ void SplitView::resized(const boo::SWindowRect& root, const boo::SWindowRect& su
m_splitBlock.setViewRect(root, ssub);
setVerticalVerts(ssub.size[1]);
}
m_splitBlockBuf->access() = m_splitBlock;
m_splitBlockBuf.access() = m_splitBlock;
m_splitVertsBinding.load<decltype(m_splitVerts)>(m_splitVerts);
}