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

Merge branch 'master' into fontdebug

This commit is contained in:
Jack Andersen
2015-12-01 15:43:54 -10:00
7 changed files with 306 additions and 43 deletions

View File

@@ -429,15 +429,18 @@ void TextView::think()
void TextView::draw(boo::IGraphicsCommandQueue* gfxQ)
{
View::draw(gfxQ);
int pendingSlot = 1 << gfxQ->pendingDynamicSlot();
if ((m_validSlots & pendingSlot) == 0)
if (m_glyphs.size())
{
m_glyphBuf->load(m_glyphs.data(), m_glyphs.size() * sizeof(RenderGlyph));
m_validSlots |= pendingSlot;
int pendingSlot = 1 << gfxQ->pendingDynamicSlot();
if ((m_validSlots & pendingSlot) == 0)
{
m_glyphBuf->load(m_glyphs.data(), m_glyphs.size() * sizeof(RenderGlyph));
m_validSlots |= pendingSlot;
}
gfxQ->setShaderDataBinding(m_shaderBinding);
gfxQ->setDrawPrimitive(boo::Primitive::TriStrips);
gfxQ->drawInstances(0, 4, m_glyphs.size());
}
gfxQ->setShaderDataBinding(m_shaderBinding);
gfxQ->setDrawPrimitive(boo::Primitive::TriStrips);
gfxQ->drawInstances(0, 4, m_glyphs.size());
}