Loading services/vr/vr_window_manager/application.cpp +4 −2 Original line number Original line Diff line number Diff line Loading @@ -206,8 +206,9 @@ void Application::DrawFrame() { if (fade_value_ > 1.0f) if (fade_value_ > 1.0f) fade_value_ = 1.0f; fade_value_ = 1.0f; controller_position_ = elbow_model_.Update(delta, last_pose_.GetRotation(), controller_position_ = controller_orientation_, false); elbow_model_.Update(delta, last_pose_.GetRotation(), controller_orientation_, should_recenter_); dvrBeginRenderFrameEds(graphics_context_, pose.orientation, dvrBeginRenderFrameEds(graphics_context_, pose.orientation, pose.translation); pose.translation); Loading @@ -233,6 +234,7 @@ void Application::DrawFrame() { OnEndFrame(); OnEndFrame(); dvrPresent(graphics_context_); dvrPresent(graphics_context_); should_recenter_ = false; } } } } Loading services/vr/vr_window_manager/application.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -80,6 +80,9 @@ class Application { bool shmem_controller_active_ = false; bool shmem_controller_active_ = false; uint64_t shmem_controller_buttons_; uint64_t shmem_controller_buttons_; // Used to center the scene when the shell becomes visible. bool should_recenter_ = true; bool is_visible_ = false; bool is_visible_ = false; std::chrono::time_point<std::chrono::system_clock> visibility_button_press_; std::chrono::time_point<std::chrono::system_clock> visibility_button_press_; bool debug_mode_ = false; bool debug_mode_ = false; Loading services/vr/vr_window_manager/shell_view.cpp +0 −1 Original line number Original line Diff line number Diff line Loading @@ -327,7 +327,6 @@ void ShellView::DrawEye(EyeType eye, const mat4& perspective, // Position the quad horizontally aligned in the direction the user // Position the quad horizontally aligned in the direction the user // is facing, effectively taking out head roll. // is facing, effectively taking out head roll. displays_[0]->Recenter(GetHorizontallyAlignedMatrixFromPose(last_pose_)); displays_[0]->Recenter(GetHorizontallyAlignedMatrixFromPose(last_pose_)); should_recenter_ = false; } } for (auto& display : displays_) { for (auto& display : displays_) { Loading services/vr/vr_window_manager/shell_view.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -84,9 +84,6 @@ class ShellView : public Application, bool is_touching_ = false; bool is_touching_ = false; int touchpad_buttons_ = 0; int touchpad_buttons_ = 0; // Used to center the scene when the shell becomes visible. bool should_recenter_ = true; std::mutex display_frame_mutex_; std::mutex display_frame_mutex_; std::vector<std::unique_ptr<DisplayView>> displays_; std::vector<std::unique_ptr<DisplayView>> displays_; Loading Loading
services/vr/vr_window_manager/application.cpp +4 −2 Original line number Original line Diff line number Diff line Loading @@ -206,8 +206,9 @@ void Application::DrawFrame() { if (fade_value_ > 1.0f) if (fade_value_ > 1.0f) fade_value_ = 1.0f; fade_value_ = 1.0f; controller_position_ = elbow_model_.Update(delta, last_pose_.GetRotation(), controller_position_ = controller_orientation_, false); elbow_model_.Update(delta, last_pose_.GetRotation(), controller_orientation_, should_recenter_); dvrBeginRenderFrameEds(graphics_context_, pose.orientation, dvrBeginRenderFrameEds(graphics_context_, pose.orientation, pose.translation); pose.translation); Loading @@ -233,6 +234,7 @@ void Application::DrawFrame() { OnEndFrame(); OnEndFrame(); dvrPresent(graphics_context_); dvrPresent(graphics_context_); should_recenter_ = false; } } } } Loading
services/vr/vr_window_manager/application.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -80,6 +80,9 @@ class Application { bool shmem_controller_active_ = false; bool shmem_controller_active_ = false; uint64_t shmem_controller_buttons_; uint64_t shmem_controller_buttons_; // Used to center the scene when the shell becomes visible. bool should_recenter_ = true; bool is_visible_ = false; bool is_visible_ = false; std::chrono::time_point<std::chrono::system_clock> visibility_button_press_; std::chrono::time_point<std::chrono::system_clock> visibility_button_press_; bool debug_mode_ = false; bool debug_mode_ = false; Loading
services/vr/vr_window_manager/shell_view.cpp +0 −1 Original line number Original line Diff line number Diff line Loading @@ -327,7 +327,6 @@ void ShellView::DrawEye(EyeType eye, const mat4& perspective, // Position the quad horizontally aligned in the direction the user // Position the quad horizontally aligned in the direction the user // is facing, effectively taking out head roll. // is facing, effectively taking out head roll. displays_[0]->Recenter(GetHorizontallyAlignedMatrixFromPose(last_pose_)); displays_[0]->Recenter(GetHorizontallyAlignedMatrixFromPose(last_pose_)); should_recenter_ = false; } } for (auto& display : displays_) { for (auto& display : displays_) { Loading
services/vr/vr_window_manager/shell_view.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -84,9 +84,6 @@ class ShellView : public Application, bool is_touching_ = false; bool is_touching_ = false; int touchpad_buttons_ = 0; int touchpad_buttons_ = 0; // Used to center the scene when the shell becomes visible. bool should_recenter_ = true; std::mutex display_frame_mutex_; std::mutex display_frame_mutex_; std::vector<std::unique_ptr<DisplayView>> displays_; std::vector<std::unique_ptr<DisplayView>> displays_; Loading