diff options
Diffstat (limited to 'source/App.cpp')
-rw-r--r-- | source/App.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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<EditorInstance>(this, &mWorld); + mEditor = std::make_unique<EditorInstance>(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) { |