2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 06:27:43 +00:00

CWorldShadowShader construct fixes

This commit is contained in:
Jack Andersen
2017-10-01 15:01:11 -10:00
parent a84f5441a7
commit 8e98a5b058
6 changed files with 11 additions and 11 deletions

View File

@@ -4,11 +4,16 @@ namespace urde
{
CWorldShadowShader::CWorldShadowShader(u32 w, u32 h)
: m_w(w), m_h(h) {}
void CWorldShadowShader::_buildTex(boo::IGraphicsDataFactory::Context& ctx)
: m_w(w), m_h(h)
{
m_tex = ctx.newRenderTexture(m_w, m_h, boo::TextureClampMode::ClampToWhite, 1, 0);
m_token = CGraphics::g_BooFactory->commitTransaction([&](boo::IGraphicsDataFactory::Context& ctx)
{
m_vbo = ctx.newDynamicBuffer(boo::BufferUse::Vertex, 16, 4);
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
m_dataBind = TShader<CWorldShadowShader>::BuildShaderDataBinding(ctx, *this);
m_tex = ctx.newRenderTexture(m_w, m_h, boo::TextureClampMode::ClampToWhite, 1, 0);
return true;
});
}
void CWorldShadowShader::bindRenderTarget()