#include "Runtime/Graphics/Shaders/CMapSurfaceShader.hpp" #include #include "Runtime/Graphics/CGraphics.hpp" namespace urde { CMapSurfaceShader::CMapSurfaceShader(hsh::vertex_buffer vbo, hsh::index_buffer ibo) { m_uniBuf = hsh::create_dynamic_uniform_buffer(); m_dataBind.hsh_bind(m_uniBuf.get(), vbo, ibo); } void CMapSurfaceShader::draw(const zeus::CColor& color, u32 start, u32 count) { SCOPED_GRAPHICS_DEBUG_GROUP("CMapSurfaceShader::draw", zeus::skMagenta); Uniform uniform = {CGraphics::GetPerspectiveProjectionMatrix(true) * CGraphics::g_GXModelView.toMatrix4f(), color}; m_uniBuf.load(uniform); m_dataBind.draw_indexed(start, count); } } // namespace urde