mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:49:34 +02:00
Restored UI fade animation
This commit is contained in:
parent
004db004a6
commit
a785ceb3da
4 changed files with 9 additions and 11 deletions
|
@ -2786,10 +2786,6 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) {
|
||||||
{
|
{
|
||||||
PerformanceTimer perfTimer("avatars");
|
PerformanceTimer perfTimer("avatars");
|
||||||
|
|
||||||
if (OculusManager::isConnected()) {
|
|
||||||
OculusManager::renderLaserPointer();
|
|
||||||
}
|
|
||||||
|
|
||||||
_avatarManager.renderAvatars(mirrorMode ? Avatar::MIRROR_RENDER_MODE : Avatar::NORMAL_RENDER_MODE, selfAvatarOnly);
|
_avatarManager.renderAvatars(mirrorMode ? Avatar::MIRROR_RENDER_MODE : Avatar::NORMAL_RENDER_MODE, selfAvatarOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
// 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()
|
// PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay()
|
||||||
applicationOverlay.renderOverlay(true);
|
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
|
//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)) {
|
if (Menu::getInstance()->isOptionChecked(MenuOption::EnableGlowEffect)) {
|
||||||
Application::getInstance()->getGlowEffect()->prepare();
|
Application::getInstance()->getGlowEffect()->prepare();
|
||||||
|
@ -325,9 +324,7 @@ void OculusManager::display(const glm::quat &bodyOrientation, const glm::vec3 &p
|
||||||
|
|
||||||
Application::getInstance()->displaySide(*_camera);
|
Application::getInstance()->displaySide(*_camera);
|
||||||
|
|
||||||
if (displayOverlays) {
|
applicationOverlay.displayOverlayTextureOculus(*_camera);
|
||||||
applicationOverlay.displayOverlayTextureOculus(*_camera);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Wait till time-warp to reduce latency
|
//Wait till time-warp to reduce latency
|
||||||
|
@ -467,7 +464,8 @@ QSize OculusManager::getRenderTargetSize() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void OculusManager::renderLaserPointer() {
|
//Renders sixense laser pointers for UI selection in the oculus
|
||||||
|
void OculusManager::renderLaserPointers() {
|
||||||
#ifdef HAVE_LIBOVR
|
#ifdef HAVE_LIBOVR
|
||||||
const float PALM_TIP_ROD_RADIUS = 0.002f;
|
const float PALM_TIP_ROD_RADIUS = 0.002f;
|
||||||
|
|
||||||
|
@ -488,6 +486,7 @@ void OculusManager::renderLaserPointer() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Gets the tip position for the laser pointer
|
||||||
glm::vec3 OculusManager::getLaserPointerTipPosition(const PalmData* palm) {
|
glm::vec3 OculusManager::getLaserPointerTipPosition(const PalmData* palm) {
|
||||||
#ifdef HAVE_LIBOVR
|
#ifdef HAVE_LIBOVR
|
||||||
const ApplicationOverlay& applicationOverlay = Application::getInstance()->getApplicationOverlay();
|
const ApplicationOverlay& applicationOverlay = Application::getInstance()->getApplicationOverlay();
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
static QSize getRenderTargetSize();
|
static QSize getRenderTargetSize();
|
||||||
|
|
||||||
/// Renders a laser pointer for UI picking
|
/// Renders a laser pointer for UI picking
|
||||||
static void renderLaserPointer();
|
static void renderLaserPointers();
|
||||||
static glm::vec3 getLaserPointerTipPosition(const PalmData* palm);
|
static glm::vec3 getLaserPointerTipPosition(const PalmData* palm);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -340,6 +340,9 @@ void ApplicationOverlay::displayOverlayTextureOculus(Camera& whichCamera) {
|
||||||
|
|
||||||
MyAvatar* myAvatar = application->getAvatar();
|
MyAvatar* myAvatar = application->getAvatar();
|
||||||
|
|
||||||
|
//Render the sixense lasers
|
||||||
|
OculusManager::renderLaserPointers();
|
||||||
|
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|
Loading…
Reference in a new issue