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

Vulkan updates

This commit is contained in:
Jack Andersen
2016-02-22 16:34:16 -10:00
parent 764d75f38e
commit 7e7f789c28
11 changed files with 281 additions and 40 deletions

View File

@@ -31,10 +31,16 @@ void CLineRendererShaders::Initialize()
case boo::IGraphicsDataFactory::Platform::D3D12:
m_bindFactory.reset(Initialize(*static_cast<boo::ID3DDataFactory*>(CGraphics::g_BooFactory)));
break;
#elif BOO_HAS_METAL
#endif
#if BOO_HAS_METAL
case boo::IGraphicsDataFactory::Platform::Metal:
m_bindFactory.reset(Initialize(*static_cast<boo::MetalDataFactory*>(CGraphics::g_BooFactory)));
break;
#endif
#if BOO_HAS_VULKAN
case boo::IGraphicsDataFactory::Platform::Vulkan:
m_bindFactory.reset(Initialize(*static_cast<boo::VulkanDataFactory*>(CGraphics::g_BooFactory)));
break;
#endif
default: break;
}
@@ -389,13 +395,13 @@ void CLineRenderer::Render(const Zeus::CColor& moduColor)
{
m_vertBuf->load(g_StaticLineVertsTex.data(), sizeof(SDrawVertTex) * g_StaticLineVertsTex.size());
CGraphics::SetShaderDataBinding(m_shaderBind);
CGraphics::DrawArray(boo::Primitive::TriStrips, 0, g_StaticLineVertsTex.size());
CGraphics::DrawArray(0, g_StaticLineVertsTex.size());
}
else
{
m_vertBuf->load(g_StaticLineVertsNoTex.data(), sizeof(SDrawVertNoTex) * g_StaticLineVertsNoTex.size());
CGraphics::SetShaderDataBinding(m_shaderBind);
CGraphics::DrawArray(boo::Primitive::TriStrips, 0, g_StaticLineVertsNoTex.size());
CGraphics::DrawArray(0, g_StaticLineVertsNoTex.size());
}
}