begin raylib

This commit is contained in:
2026-01-04 17:19:13 +01:00
parent 0d84cc7470
commit 44851099d4
39 changed files with 291 additions and 743 deletions

View File

@@ -1,7 +1,7 @@
#pragma once
#include <memory>
#include <td/render/Camera.h>
#include <raylib.h>
#include <td/render/loader/GLLoader.h>
#include <td/render/shader/CameraShaderProgram.h>
#include <td/misc/SlotGuard.h>
@@ -66,15 +66,15 @@ class RenderPipeline {
template <typename TShader>
Renderer<TShader>::Renderer(Camera& a_Camera) : m_Shader(std::make_unique<TShader>()), m_Camera(a_Camera) {
Connect(a_Camera.OnPerspectiveChange, [this](){
m_Shader->Start();
m_Shader->SetProjectionMatrix(m_Camera.GetProjectionMatrix());
});
// Connect(a_Camera.OnPerspectiveChange, [this](){
// // m_Shader->Start();
// m_Shader->SetProjectionMatrix(m_Camera.GetProjectionMatrix());
// });
Connect(a_Camera.OnViewChange, [this]() {
m_Shader->Start();
m_Shader->SetViewMatrix(m_Camera.GetViewMatrix());
});
// Connect(a_Camera.OnViewChange, [this]() {
// // m_Shader->Start();
// m_Shader->SetViewMatrix(m_Camera.GetViewMatrix());
// });
}
} // namespace render