fixed windows builds

This commit is contained in:
2025-07-20 00:45:31 +03:00
parent 070c3ff309
commit fb4c201921
26 changed files with 519 additions and 338 deletions

View File

@@ -95,7 +95,7 @@ class CMeshRendering: public IMeshRendering
void CMeshRendering::Init()
{
g_MeshPipeline = IRenderer::CreateGraphicsPipeline(
g_MeshPipeline = Renderer()->CreateGraphicsPipeline(
{
{"gfx/mesh_vert.shader", SHADER_TYPE_VERTEX},
{"gfx/mesh_frag.shader", SHADER_TYPE_FRAGMENT},
@@ -115,12 +115,12 @@ void CMeshRendering::Init()
void CMeshRendering::Frame( float fDelta )
{
g_MeshPipeline->BindData(0, IRenderer::GetCameraMatrix(), 0);
g_MeshPipeline->BindData(0, Renderer()->GetCameraMatrix(), 0);
g_MeshPipeline->PushBindings();
IRenderer::ResetState();
IRenderer::SetDepthMode(DEPTH_MODE_LESS);
IRenderer::BindPipeline(g_MeshPipeline);
Renderer()->ResetState();
Renderer()->SetDepthMode(DEPTH_MODE_LESS);
Renderer()->BindPipeline(g_MeshPipeline);
for (auto &v: g_meshes)
{
CMeshInstance *pMesh = (CMeshInstance*)v;
@@ -134,8 +134,8 @@ void CMeshRendering::Frame( float fDelta )
constants.i[3][0] = pMesh->m_position[0];
constants.i[3][1] = pMesh->m_position[1];
constants.i[3][2] = pMesh->m_position[2];
IRenderer::SetConstants(sizeof(constants), &constants);
IRenderer::Draw(pMesh->m_pVertexBuffer, pMesh->m_pIndexBuffer);
Renderer()->SetConstants(sizeof(constants), &constants);
Renderer()->Draw(pMesh->m_pVertexBuffer, pMesh->m_pIndexBuffer);
}
g_meshes = {};
}