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

Changes to support boo object tracker API

This commit is contained in:
Jack Andersen
2017-11-04 20:17:12 -10:00
parent d301491bd6
commit 3894749675
138 changed files with 1679 additions and 1243 deletions

View File

@@ -6,7 +6,7 @@ namespace urde
CAABoxShader::CAABoxShader(bool zOnly)
: m_zOnly(zOnly)
{
m_token = CGraphics::g_BooFactory->commitTransaction([&](boo::IGraphicsDataFactory::Context& ctx)
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx)
{
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, sizeof(zeus::CVector3f), 34);
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
@@ -69,12 +69,10 @@ void CAABoxShader::draw(const zeus::CColor& color)
m_uniform.m_color = color;
m_uniBuf->load(&m_uniform, sizeof(Uniform));
CGraphics::g_BooMainCommandQueue->setShaderDataBinding(m_dataBind);
CGraphics::g_BooMainCommandQueue->draw(0, 34);
CGraphics::SetShaderDataBinding(m_dataBind);
CGraphics::DrawArray(0, 34);
}
void CAABoxShader::Shutdown() {}
URDE_SPECIALIZE_SHADER(CAABoxShader)
}