diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 06ba3e442e..9842144bff 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2786,10 +2786,6 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { { PerformanceTimer perfTimer("avatars"); - if (OculusManager::isConnected()) { - OculusManager::renderLaserPointer(); - } - _avatarManager.renderAvatars(mirrorMode ? Avatar::MIRROR_RENDER_MODE : Avatar::NORMAL_RENDER_MODE, selfAvatarOnly); } diff --git a/interface/src/devices/OculusManager.cpp b/interface/src/devices/OculusManager.cpp index b3c478e5e9..574aa3c6f6 100644 --- a/interface/src/devices/OculusManager.cpp +++ b/interface/src/devices/OculusManager.cpp @@ -269,8 +269,7 @@ void OculusManager::display(const glm::quat &bodyOrientation, const glm::vec3 &p // We only need to render the overlays to a texture once, then we just render the texture on the hemisphere // PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay() applicationOverlay.renderOverlay(true); - const bool displayOverlays = Menu::getInstance()->isOptionChecked(MenuOption::UserInterface); - + //Bind our framebuffer object. If we are rendering the glow effect, we let the glow effect shader take care of it if (Menu::getInstance()->isOptionChecked(MenuOption::EnableGlowEffect)) { Application::getInstance()->getGlowEffect()->prepare(); @@ -325,9 +324,7 @@ void OculusManager::display(const glm::quat &bodyOrientation, const glm::vec3 &p Application::getInstance()->displaySide(*_camera); - if (displayOverlays) { - applicationOverlay.displayOverlayTextureOculus(*_camera); - } + applicationOverlay.displayOverlayTextureOculus(*_camera); } //Wait till time-warp to reduce latency @@ -467,7 +464,8 @@ QSize OculusManager::getRenderTargetSize() { #endif } -void OculusManager::renderLaserPointer() { +//Renders sixense laser pointers for UI selection in the oculus +void OculusManager::renderLaserPointers() { #ifdef HAVE_LIBOVR const float PALM_TIP_ROD_RADIUS = 0.002f; @@ -488,6 +486,7 @@ void OculusManager::renderLaserPointer() { #endif } +//Gets the tip position for the laser pointer glm::vec3 OculusManager::getLaserPointerTipPosition(const PalmData* palm) { #ifdef HAVE_LIBOVR const ApplicationOverlay& applicationOverlay = Application::getInstance()->getApplicationOverlay(); diff --git a/interface/src/devices/OculusManager.h b/interface/src/devices/OculusManager.h index 73ce6ef2d3..871e5d649a 100644 --- a/interface/src/devices/OculusManager.h +++ b/interface/src/devices/OculusManager.h @@ -44,7 +44,7 @@ public: static QSize getRenderTargetSize(); /// Renders a laser pointer for UI picking - static void renderLaserPointer(); + static void renderLaserPointers(); static glm::vec3 getLaserPointerTipPosition(const PalmData* palm); private: diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index 6d8af6641f..6324ee03b0 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -340,6 +340,9 @@ void ApplicationOverlay::displayOverlayTextureOculus(Camera& whichCamera) { MyAvatar* myAvatar = application->getAvatar(); + //Render the sixense lasers + OculusManager::renderLaserPointers(); + glActiveTexture(GL_TEXTURE0); glEnable(GL_BLEND);