This commit is contained in:
2025-07-16 00:32:40 +02:00
parent d1690192db
commit aaf76a3ff0
41 changed files with 2963 additions and 599 deletions

View File

@@ -0,0 +1,26 @@
#include <td/render/renderer/WorldRenderer.h>
#include <td/render/loader/WorldLoader.h>
#include <imgui.h>
namespace td {
namespace render {
WorldRenderer::WorldRenderer(Camera& a_Camera, const game::World& a_World) : Renderer(a_Camera), m_World(a_World){
m_WorldVao = std::make_unique<GL::VertexArray>(std::move(WorldLoader::LoadWorldModel(&a_World)));
}
WorldRenderer::~WorldRenderer() {}
void WorldRenderer::Render() {
m_Shader.Start();
m_Shader.SetProjectionMatrix(m_Camera.GetProjectionMatrix());
m_Shader.SetViewMatrix(m_Camera.GetViewMatrix());
Renderer::Render(*m_WorldVao);
ImGui::ShowDemoWindow();
}
} // namespace render
} // namespace td