@@ -34,6 +34,13 @@ void Viewport::render(double delta_time)
3434
3535 m_camera_controller.camera ->position = config.camera_position ;
3636 m_camera_controller.camera ->target = config.camera_target ;
37+ m_camera_controller.camera ->fov = config.fov ;
38+ m_camera_controller.camera ->near = config.near ;
39+ m_camera_controller.camera ->far = config.far ;
40+ m_camera_controller.type = config.camera_controller_type ;
41+ m_camera_controller.movement_speed = config.movement_speed ;
42+ m_camera_controller.rotation_speed = config.rotation_speed ;
43+ m_camera_controller.zoom_speed = config.zoom_speed ;
3744
3845 m_camera_controller.update (delta_time, ImGui::IsWindowFocused (), ImGui::IsWindowHovered ());
3946
@@ -48,13 +55,6 @@ void Viewport::render(double delta_time)
4855 } else {
4956 glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
5057 }
51- m_camera_controller.camera ->fov = config.fov ;
52- m_camera_controller.camera ->near = config.near ;
53- m_camera_controller.camera ->far = config.far ;
54- m_camera_controller.type = config.camera_controller_type ;
55- m_camera_controller.movement_speed = config.movement_speed ;
56- m_camera_controller.rotation_speed = config.rotation_speed ;
57- m_camera_controller.zoom_speed = config.zoom_speed ;
5858 m_camera_controller.camera ->draw (config.viewing_mode , config.viewport_uniforms , m_framebuffer, *project->scene );
5959
6060 if (project->selected_node ) {
0 commit comments