2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-21 20:19:12 +00:00

Vulkan and HLSL object tracker support

This commit is contained in:
Jack Andersen
2017-11-05 20:58:04 -10:00
parent 3894749675
commit 62c1dc467f
47 changed files with 801 additions and 347 deletions

View File

@@ -52,14 +52,15 @@ struct CFogVolumePlaneShaderGLDataBindingFactory : TShader<CFogVolumePlaneShader
#if BOO_HAS_VULKAN
struct CFogVolumePlaneShaderVulkanDataBindingFactory : TShader<CFogVolumePlaneShader>::IDataBindingFactory
{
boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
CFogVolumePlaneShader& filter)
boo::ObjToken<boo::IShaderDataBinding>
BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
CFogVolumePlaneShader& filter)
{
boo::VulkanDataFactory::Context& cctx = static_cast<boo::VulkanDataFactory::Context&>(ctx);
for (int i=0 ; i<4 ; ++i)
filter.m_dataBinds[i] = cctx.newShaderDataBinding(s_Pipelines[i], s_VtxFmt,
filter.m_vbo, nullptr, nullptr, 0, nullptr,
filter.m_vbo.get(), nullptr, nullptr, 0, nullptr,
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr);
return filter.m_dataBinds[0];
}
@@ -116,6 +117,16 @@ CFogVolumePlaneShader::Initialize(boo::VulkanDataFactory::Context& ctx)
boo::ZTest::Greater, false, false, false, boo::CullMode::Backface);
return new CFogVolumePlaneShaderVulkanDataBindingFactory;
}
template <>
void CFogVolumePlaneShader::Shutdown<boo::VulkanDataFactory>()
{
s_VtxFmt.reset();
s_Pipelines[0].reset();
s_Pipelines[1].reset();
s_Pipelines[2].reset();
s_Pipelines[3].reset();
}
#endif
}