mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 15:47:46 +00:00
Finish CMapWorld and CMapUniverse rendering
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ class CMapSurfaceShader
|
||||
zeus::CColor color;
|
||||
};
|
||||
|
||||
Uniform m_uniform;
|
||||
boo::IGraphicsBufferD* m_uniBuf;
|
||||
boo::IGraphicsBufferS* m_vbo;
|
||||
boo::IGraphicsBufferS* m_ibo;
|
||||
|
||||
Reference in New Issue
Block a user