mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 16:27:42 +00:00
DeferredWindowEvents class to prevent race conditions
This commit is contained in:
@@ -429,16 +429,18 @@ void TextView::think()
|
||||
void TextView::draw(boo::IGraphicsCommandQueue* gfxQ)
|
||||
{
|
||||
View::draw(gfxQ);
|
||||
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);
|
||||
if (m_glyphs.size())
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user