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

@@ -306,7 +306,7 @@ void TextView::_commitResources(size_t capacity)
if (capacity)
{
m_glyphBuf.emplace(res.m_textRes.m_glyphPool.allocateBlock(res.m_factory, capacity));
m_glyphBuf = res.m_textRes.m_glyphPool.allocateBlock(res.m_factory, capacity);
boo::IShaderPipeline* shader;
if (m_fontAtlas.subpixel())
@@ -314,8 +314,8 @@ void TextView::_commitResources(size_t capacity)
else
shader = res.m_textRes.m_regular;
auto vBufInfo = m_glyphBuf->getBufferInfo();
auto uBufInfo = m_viewVertBlockBuf->getBufferInfo();
auto vBufInfo = m_glyphBuf.getBufferInfo();
auto uBufInfo = m_viewVertBlockBuf.getBufferInfo();
boo::IGraphicsBuffer* uBufs[] = {uBufInfo.first};
size_t uBufOffs[] = {size_t(uBufInfo.second)};
size_t uBufSizes[] = {sizeof(ViewBlock)};
@@ -550,7 +550,7 @@ void TextView::invalidateGlyphs()
{
if (m_glyphBuf)
{
RenderGlyph* out = m_glyphBuf->access();
RenderGlyph* out = m_glyphBuf.access();
size_t i = 0;
for (RenderGlyph& glyph : m_glyphs)
out[i++] = glyph;