2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 04:27:42 +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

@@ -23,7 +23,8 @@ hecl::VertexBufferPool<CLineRenderer::SDrawVertNoTex> CLineRenderer::s_vertPoolN
hecl::UniformBufferPool<CLineRenderer::SDrawUniform> CLineRenderer::s_uniformPool = {};
CLineRenderer::CLineRenderer(boo::IGraphicsDataFactory::Context& ctx,
EPrimitiveMode mode, u32 maxVerts, boo::ITexture* texture, bool additive)
EPrimitiveMode mode, u32 maxVerts,
const boo::ObjToken<boo::ITexture>& texture, bool additive)
: m_mode(mode), m_maxVerts(maxVerts)
{
if (maxVerts < 2)
@@ -31,7 +32,7 @@ CLineRenderer::CLineRenderer(boo::IGraphicsDataFactory::Context& ctx,
LineRendererLog.report(logvisor::Fatal, _S("maxVerts < 2, maxVerts = %i"), maxVerts);
return;
}
m_textured = texture != nullptr;
m_textured = texture;
u32 maxTriVerts;
switch (mode)
@@ -57,7 +58,8 @@ CLineRenderer::CLineRenderer(boo::IGraphicsDataFactory::Context& ctx,
CLineRendererShaders::BuildShaderDataBinding(ctx, *this, texture, additive);
}
CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts, boo::ITexture* texture, bool additive)
CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts,
const boo::ObjToken<boo::ITexture>& texture, bool additive)
: m_mode(mode), m_maxVerts(maxVerts)
{
if (maxVerts < 2)
@@ -65,7 +67,7 @@ CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts, boo::ITexture* t
LineRendererLog.report(logvisor::Fatal, _S("maxVerts < 2, maxVerts = %i"), maxVerts);
return;
}
m_textured = texture != nullptr;
m_textured = texture;
u32 maxTriVerts;
switch (mode)
@@ -88,7 +90,7 @@ CLineRenderer::CLineRenderer(EPrimitiveMode mode, u32 maxVerts, boo::ITexture* t
m_uniformBuf = s_uniformPool.allocateBlock(CGraphics::g_BooFactory);
m_gfxToken = CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
CGraphics::CommitResources([&](boo::IGraphicsDataFactory::Context& ctx) -> bool
{
CLineRendererShaders::BuildShaderDataBinding(ctx, *this, texture, additive);
return true;