From 242317c1f7f2a6abdfbdbc99d5297539bbdc842f Mon Sep 17 00:00:00 2001 From: hnOsmium0001 Date: Sat, 30 Apr 2022 13:55:20 -0700 Subject: Add ImGuizmo for GameObjects, start to make things actually render --- source/App.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/App.cpp') diff --git a/source/App.cpp b/source/App.cpp index dc38342..9c18fea 100644 --- a/source/App.cpp +++ b/source/App.cpp @@ -25,7 +25,7 @@ App::App() { mGameCamera.SetHasPerspective(false); mEditorCamera.Move(glm::vec3(0, 0, 1)); mEditorCamera.LookAt(glm::vec3(0, 0, 0)); - mGameCamera.SetHasPerspective(false); + mEditorCamera.SetHasPerspective(false); } App::~App() { @@ -55,7 +55,7 @@ void App::SetEditorVisible(bool visible) { mEditorVisible = visible; if (visible) { if (mEditor == nullptr) { - mEditor = std::make_unique(this, &mWorld); + mEditor = std::make_unique(this); } } } @@ -70,6 +70,7 @@ void App::Show() { void App::Update() { if (IsGameRunning()) { mWorld.Update(); + mEditor->OnUpdate(); } } @@ -98,6 +99,8 @@ void App::Draw(float currentTime, float deltaTime) { } mRenderer.EndFrame(); + // TODO pass camera info to editor without strong coupling to Renderer + mEditor->OnDraw(mRenderer.GetLastFrameInfo()); } void App::HandleMouse(int button, int action) { -- cgit v1.2.3-70-g09d2