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

Finish CMapWorld and CMapUniverse rendering

This commit is contained in:
Jack Andersen
2017-04-24 15:11:31 -10:00
parent 72cac044d3
commit 53c01af8e9
10 changed files with 278 additions and 78 deletions

View File

@@ -14,9 +14,10 @@ CMapSurfaceShader::CMapSurfaceShader(boo::IGraphicsDataFactory::Context& ctx,
void CMapSurfaceShader::draw(const zeus::CColor& color, u32 start, u32 count)
{
m_uniform.mtx = CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f();
m_uniform.color = color;
m_uniBuf->load(&m_uniform, sizeof(m_uniform));
Uniform uniform = {
CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f(), color
};
m_uniBuf->load(&uniform, sizeof(uniform));
CGraphics::SetShaderDataBinding(m_dataBind);
CGraphics::DrawArrayIndexed(start, count);
}

View File

@@ -19,7 +19,6 @@ class CMapSurfaceShader
zeus::CColor color;
};
Uniform m_uniform;
boo::IGraphicsBufferD* m_uniBuf;
boo::IGraphicsBufferS* m_vbo;
boo::IGraphicsBufferS* m_ibo;