mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-22 00:19:13 +00:00
Vulkan and HLSL object tracker support
This commit is contained in:
@@ -539,12 +539,12 @@ CFluidPlaneShader::BuildShader(boo::GLDataFactory::Context& ctx, const SFluidPla
|
||||
}
|
||||
|
||||
#if BOO_HAS_VULKAN
|
||||
static boo::IVertexFormat* s_vtxFmt = nullptr;
|
||||
static boo::ObjToken<boo::IVertexFormat> s_vtxFmt;
|
||||
|
||||
boo::IShaderPipeline*
|
||||
boo::ObjToken<boo::IShaderPipeline>
|
||||
CFluidPlaneShader::BuildShader(boo::VulkanDataFactory::Context& ctx, const SFluidPlaneShaderInfo& info)
|
||||
{
|
||||
if (s_vtxFmt == nullptr)
|
||||
if (!s_vtxFmt)
|
||||
{
|
||||
boo::VertexElementDescriptor elements[] =
|
||||
{
|
||||
@@ -568,10 +568,10 @@ CFluidPlaneShader::BuildShader(boo::VulkanDataFactory::Context& ctx, const SFlui
|
||||
boo::CullMode::None);
|
||||
}
|
||||
|
||||
boo::IShaderPipeline*
|
||||
boo::ObjToken<boo::IShaderPipeline>
|
||||
CFluidPlaneShader::BuildShader(boo::VulkanDataFactory::Context& ctx, const SFluidPlaneDoorShaderInfo& info)
|
||||
{
|
||||
if (s_vtxFmt == nullptr)
|
||||
if (!s_vtxFmt)
|
||||
{
|
||||
boo::VertexElementDescriptor elements[] =
|
||||
{
|
||||
@@ -634,16 +634,17 @@ CFluidPlaneShader::BuildBinding(boo::GLDataFactory::Context& ctx,
|
||||
}
|
||||
|
||||
#if BOO_HAS_VULKAN
|
||||
boo::IShaderDataBinding* CFluidPlaneShader::BuildBinding(boo::VulkanDataFactory::Context& ctx,
|
||||
boo::IShaderPipeline* pipeline, bool door)
|
||||
boo::ObjToken<boo::IShaderDataBinding>
|
||||
CFluidPlaneShader::BuildBinding(boo::VulkanDataFactory::Context& ctx,
|
||||
const boo::ObjToken<boo::IShaderPipeline>& pipeline, bool door)
|
||||
{
|
||||
boo::IGraphicsBuffer* ubufs[] = { m_uniBuf, m_uniBuf, m_uniBuf };
|
||||
boo::ObjToken<boo::IGraphicsBuffer> ubufs[] = { m_uniBuf.get(), m_uniBuf.get(), m_uniBuf.get() };
|
||||
boo::PipelineStage ubufStages[] = { boo::PipelineStage::Vertex, boo::PipelineStage::Vertex,
|
||||
boo::PipelineStage::Fragment };
|
||||
size_t ubufOffs[] = {0, 0, 768};
|
||||
size_t ubufSizes[] = {768, 768, 256};
|
||||
size_t texCount = 0;
|
||||
boo::ITexture* texs[7] = {};
|
||||
boo::ObjToken<boo::ITexture> texs[7] = {};
|
||||
if (m_patternTex1)
|
||||
texs[texCount++] = (*m_patternTex1)->GetBooTexture();
|
||||
if (m_patternTex2)
|
||||
@@ -658,7 +659,7 @@ boo::IShaderDataBinding* CFluidPlaneShader::BuildBinding(boo::VulkanDataFactory:
|
||||
texs[texCount++] = (*m_envBumpMap)->GetBooTexture();
|
||||
if (m_lightmap)
|
||||
texs[texCount++] = (*m_lightmap)->GetBooTexture();
|
||||
return ctx.newShaderDataBinding(pipeline, s_vtxFmt, m_vbo, nullptr, nullptr, door ? 1 : 3,
|
||||
return ctx.newShaderDataBinding(pipeline, s_vtxFmt, m_vbo.get(), nullptr, nullptr, door ? 1 : 3,
|
||||
ubufs, ubufStages, ubufOffs, ubufSizes, texCount, texs, nullptr, nullptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user