From 1c3e7e81049efefe8b54e4d4a719feeda995b474 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 24 Jan 2021 16:36:02 +0000 Subject: Remove the weird view/model/camera connectedness --- application/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'application') diff --git a/application/main.cpp b/application/main.cpp index 63ceac0..015f128 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -68,6 +68,8 @@ public: Shader shader; Camera camera({0.0F, 0.0F, -5.0F}, 70.0F, (float)DISPLAY_WIDTH / (float)DISPLAY_HEIGHT, 0.1F, 100.0F); + shader.Bind(); + shader.setView(camera.GetViewProjection()); SDL_Event e; bool isRunning = true; @@ -87,8 +89,7 @@ public: world.apply(&WorldObject::tick, t_passed); windows.apply(&Window::Clear, 0.0F, 0.0F, 0.0F, 1.0F); - shader.Bind(); - world.apply(&Physical::render, shader, camera); + world.apply(&Physical::render, shader); windows.apply(&Window::SwapBuffers); if (const auto snz = framelen - t_passed; snz.count() > 0) { -- cgit v1.2.3