diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-17 00:23:21 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-17 00:34:57 +0000 |
commit | 5283c898f008a54a1f275841281e2b7aa685f02c (patch) | |
tree | a75620a02da52e444a5c72d08b5f8d37e675fe61 /application/main.cpp | |
parent | Tidy code for calculating position of rail vehicle by bogeys (diff) | |
download | ilt-5283c898f008a54a1f275841281e2b7aa685f02c.tar.bz2 ilt-5283c898f008a54a1f275841281e2b7aa685f02c.tar.xz ilt-5283c898f008a54a1f275841281e2b7aa685f02c.zip |
Disconnect camera control from shader
Diffstat (limited to 'application/main.cpp')
-rw-r--r-- | application/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/application/main.cpp b/application/main.cpp index 04ff9c0..72da726 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -98,7 +98,8 @@ public: const auto t_passed = std::chrono::duration_cast<WorldObject::TickDuration>(t_end - t_start); world.apply(&WorldObject::tick, t_passed); - world.apply<CameraController>(&CameraController::updateCamera, &camera, &shader); + world.apply<CameraController>(&CameraController::updateCamera, &camera); + shader.setView(camera.GetViewProjection()); windows.apply(&Window::Clear, 0.0F, 0.0F, 0.0F, 1.0F); world.apply<Renderable>(&Renderable::render, shader); windows.apply(&Window::SwapBuffers); |