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

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -2,31 +2,23 @@
#include "Graphics/CGraphics.hpp"
#include "hecl/Pipeline.hpp"
namespace urde::MP1
{
namespace urde::MP1 {
boo::ObjToken<boo::IShaderPipeline> CNESShader::g_Pipeline;
void CNESShader::Initialize()
{
g_Pipeline = hecl::conv->convert(Shader_CNESShader{});
}
void CNESShader::Initialize() { g_Pipeline = hecl::conv->convert(Shader_CNESShader{}); }
boo::ObjToken<boo::IShaderDataBinding> CNESShader::BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
boo::ObjToken<boo::IGraphicsBufferS> vbo,
boo::ObjToken<boo::IGraphicsBufferD> uniBuf,
boo::ObjToken<boo::ITextureD> tex)
{
boo::ObjToken<boo::IGraphicsBuffer> bufs[] = {uniBuf.get()};
boo::PipelineStage stages[] = {boo::PipelineStage::Vertex};
boo::ObjToken<boo::ITexture> texs[] = {tex.get()};
return ctx.newShaderDataBinding(g_Pipeline, vbo.get(), nullptr, nullptr,
1, bufs, stages, nullptr, nullptr, 1, texs, nullptr, nullptr);
boo::ObjToken<boo::ITextureD> tex) {
boo::ObjToken<boo::IGraphicsBuffer> bufs[] = {uniBuf.get()};
boo::PipelineStage stages[] = {boo::PipelineStage::Vertex};
boo::ObjToken<boo::ITexture> 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();
}
void CNESShader::Shutdown() { g_Pipeline.reset(); }
}
} // namespace urde::MP1