begin raylib
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user