mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-20 21:39:12 +00:00
Vulkan and HLSL object tracker support
This commit is contained in:
@@ -70,14 +70,15 @@ struct CAABoxShaderGLDataBindingFactory : TShader<CAABoxShader>::IDataBindingFac
|
||||
#if BOO_HAS_VULKAN
|
||||
struct CAABoxShaderVulkanDataBindingFactory : TShader<CAABoxShader>::IDataBindingFactory
|
||||
{
|
||||
boo::IShaderDataBinding* BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
|
||||
CAABoxShader& filter)
|
||||
boo::ObjToken<boo::IShaderDataBinding>
|
||||
BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
|
||||
CAABoxShader& filter)
|
||||
{
|
||||
boo::VulkanDataFactory::Context& cctx = static_cast<boo::VulkanDataFactory::Context&>(ctx);
|
||||
|
||||
boo::IGraphicsBuffer* bufs[] = {filter.m_uniBuf};
|
||||
boo::ObjToken<boo::IGraphicsBuffer> bufs[] = {filter.m_uniBuf.get()};
|
||||
return cctx.newShaderDataBinding(filter.m_zOnly ? s_zOnlyPipeline : s_Pipeline, s_VtxFmt,
|
||||
filter.m_vbo, nullptr, nullptr, 1, bufs,
|
||||
filter.m_vbo.get(), nullptr, nullptr, 1, bufs,
|
||||
nullptr, nullptr, nullptr, 0, nullptr, nullptr, nullptr);
|
||||
}
|
||||
};
|
||||
@@ -118,6 +119,14 @@ TShader<CAABoxShader>::IDataBindingFactory* CAABoxShader::Initialize(boo::Vulkan
|
||||
boo::ZTest::LEqual, true, false, false, boo::CullMode::None);
|
||||
return new CAABoxShaderVulkanDataBindingFactory;
|
||||
}
|
||||
|
||||
template <>
|
||||
void CAABoxShader::Shutdown<boo::VulkanDataFactory>()
|
||||
{
|
||||
s_VtxFmt.reset();
|
||||
s_Pipeline.reset();
|
||||
s_zOnlyPipeline.reset();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user