#include "CNESShader.hpp" #include "Graphics/CGraphics.hpp" #include "hecl/Pipeline.hpp" namespace urde::MP1 { boo::ObjToken CNESShader::g_Pipeline; void CNESShader::Initialize() { g_Pipeline = hecl::conv->convert(Shader_CNESShader{}); } boo::ObjToken CNESShader::BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, boo::ObjToken vbo, boo::ObjToken uniBuf, boo::ObjToken tex) { boo::ObjToken bufs[] = {uniBuf.get()}; boo::PipelineStage stages[] = {boo::PipelineStage::Vertex}; boo::ObjToken texs[] = {tex.get()}; return ctx.newShaderDataBinding(g_Pipeline, vbo.get(), nullptr, nullptr, 1, bufs, stages, nullptr, nullptr, 1, texs, nullptr, nullptr); } void CNESShader::Shutdown() { g_Pipeline.reset(); } }