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

Tweaks for CVar integration

This commit is contained in:
Jack Andersen
2015-12-02 11:11:50 -10:00
parent b431ba8686
commit 3ee468157b
10 changed files with 40 additions and 25 deletions

View File

@@ -103,6 +103,14 @@ void SplitView::mouseMove(const boo::SWindowCoord& coord)
}
}
void SplitView::resetResources(ViewResources& res)
{
if (m_views[0])
m_views[0]->resetResources(res);
if (m_views[1])
m_views[1]->resetResources(res);
}
void SplitView::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub)
{
View::resized(root, sub);
@@ -132,7 +140,7 @@ void SplitView::resized(const boo::SWindowRect& root, const boo::SWindowRect& su
m_splitBlock.setViewRect(root, ssub);
setVerticalVerts(ssub.size[1]);
}
m_splitValidSlots = 0;
m_splitValid = false;
}
void SplitView::draw(boo::IGraphicsCommandQueue* gfxQ)
@@ -143,12 +151,11 @@ void SplitView::draw(boo::IGraphicsCommandQueue* gfxQ)
if (m_views[1])
m_views[1]->draw(gfxQ);
int pendingSlot = 1 << gfxQ->pendingDynamicSlot();
if ((m_splitValidSlots & pendingSlot) == 0)
if (!m_splitValid)
{
m_splitBlockBuf->load(&m_splitBlock, sizeof(VertexBlock));
m_splitVertsBuf->load(m_splitVerts, sizeof(SplitVert) * 4);
m_splitValidSlots |= pendingSlot;
m_splitValid = true;
}
gfxQ->setShaderDataBinding(m_splitShaderBinding);
gfxQ->draw(0, 4);