Showing the changes to interface/src/Application.cpp (1 of 162 files). Show all
Unified · Split
| @@ -116,7 +116,7 @@ · 115 unmodified lines | ||
| 116 | 116 | #include "devices/RealSense.h" |
| 117 | 117 | #include "devices/SDL2Manager.h" |
| 118 | 118 | #include "devices/TV3DManager.h" |
| 119 | −#include "devices/3Dconnexion.h" | |
| 119 | +#include "devices/3DConnexionClient.h" | |
| 120 | 120 | |
| 121 | 121 | #include "scripting/AccountScriptingInterface.h" |
| 122 | 122 | #include "scripting/AudioDeviceScriptingInterface.h" |
| @@ -648,7 +648,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 525 unmodified lines | ||
| 648 | 648 | applicationUpdater->checkForUpdate(); |
| 649 | 649 | |
| 650 | 650 | // the 3Dconnexion device wants to be initiliazed after a window is displayed. |
| 651 | − ConnexionClient::init(); | |
| 651 | + ConnexionClient::getInstance().init(); | |
| 652 | 652 | |
| 653 | 653 | auto& packetReceiver = nodeList->getPacketReceiver(); |
| 654 | 654 | packetReceiver.registerListener(PacketType::DomainConnectionDenied, this, "handleDomainConnectionDeniedPacket"); |
| @@ -764,7 +764,7 @@ Application::~Application() { · 109 unmodified lines | ||
| 764 | 764 | |
| 765 | 765 | Leapmotion::destroy(); |
| 766 | 766 | RealSense::destroy(); |
| 767 | − ConnexionClient::destroy(); | |
| 767 | + ConnexionClient::getInstance().destroy(); | |
| 768 | 768 | |
| 769 | 769 | qInstallMessageHandler(NULL); // NOTE: Do this as late as possible so we continue to get our log messages |
| 770 | 770 | } |
| @@ -903,14 +903,15 @@ void Application::paintGL() { · 132 unmodified lines | ||
| 903 | 903 | |
| 904 | 904 | { |
| 905 | 905 | float ratio = ((float)QApplication::desktop()->windowHandle()->devicePixelRatio() * getRenderResolutionScale()); |
| 906 | − auto mirrorViewport = glm::ivec4(0, 0, _mirrorViewRect.width() * ratio, _mirrorViewRect.height() * ratio); | |
| 907 | − auto mirrorViewportDest = mirrorViewport; | |
| 906 | + // Flip the src and destination rect horizontally to do the mirror | |
| 907 | + auto mirrorRect = glm::ivec4(0, 0, _mirrorViewRect.width() * ratio, _mirrorViewRect.height() * ratio); | |
| 908 | + auto mirrorRectDest = glm::ivec4(mirrorRect.z, mirrorRect.y, mirrorRect.x, mirrorRect.w); | |
| 908 | 909 | |
| 909 | 910 | auto selfieFbo = DependencyManager::get<FramebufferCache>()->getSelfieFramebuffer(); |
| 910 | 911 | gpu::Batch batch; |
| 911 | 912 | batch.setFramebuffer(selfieFbo); |
| 912 | 913 | batch.clearColorFramebuffer(gpu::Framebuffer::BUFFER_COLOR0, glm::vec4(0.0f, 0.0f, 0.0f, 0.0f)); |
| 913 | − batch.blit(primaryFbo, mirrorViewport, selfieFbo, mirrorViewportDest); | |
| 914 | + batch.blit(primaryFbo, mirrorRect, selfieFbo, mirrorRectDest); | |
| 914 | 915 | batch.setFramebuffer(nullptr); |
| 915 | 916 | renderArgs._context->render(batch); |
| 916 | 917 | } |
| @@ -1001,8 +1002,14 @@ void Application::paintGL() { · 84 unmodified lines | ||
| 1001 | 1002 | auto geometryCache = DependencyManager::get<GeometryCache>(); |
| 1002 | 1003 | auto primaryFbo = DependencyManager::get<FramebufferCache>()->getPrimaryFramebufferDepthColor(); |
| 1003 | 1004 | gpu::Batch batch; |
| 1004 | − batch.blit(primaryFbo, glm::ivec4(0, 0, _renderResolution.x, _renderResolution.y), | |
| 1005 | − nullptr, glm::ivec4(0, 0, _glWidget->getDeviceSize().width(), _glWidget->getDeviceSize().height())); | |
| 1005 | + | |
| 1006 | + if (renderArgs._renderMode == RenderArgs::MIRROR_RENDER_MODE) { | |
| 1007 | + batch.blit(primaryFbo, glm::ivec4(0, 0, _renderResolution.x, _renderResolution.y), | |
| 1008 | + nullptr, glm::ivec4(_glWidget->getDeviceSize().width(), 0, 0, _glWidget->getDeviceSize().height())); | |
| 1009 | + } else { | |
| 1010 | + batch.blit(primaryFbo, glm::ivec4(0, 0, _renderResolution.x, _renderResolution.y), | |
| 1011 | + nullptr, glm::ivec4(0, 0, _glWidget->getDeviceSize().width(), _glWidget->getDeviceSize().height())); | |
| 1012 | + } | |
| 1006 | 1013 | |
| 1007 | 1014 | batch.setFramebuffer(nullptr); |
| 1008 | 1015 | |
| @@ -2023,6 +2030,7 @@ void Application::setActiveFaceTracker() { · 1014 unmodified lines | ||
| 2023 | 2030 | #ifdef HAVE_DDE |
| 2024 | 2031 | bool isUsingDDE = Menu::getInstance()->isOptionChecked(MenuOption::UseCamera); |
| 2025 | 2032 | Menu::getInstance()->getActionForOption(MenuOption::BinaryEyelidControl)->setVisible(isUsingDDE); |
| 2033 | + Menu::getInstance()->getActionForOption(MenuOption::CoupleEyelids)->setVisible(isUsingDDE); | |
| 2026 | 2034 | Menu::getInstance()->getActionForOption(MenuOption::UseAudioForMouth)->setVisible(isUsingDDE); |
| 2027 | 2035 | Menu::getInstance()->getActionForOption(MenuOption::VelocityFilter)->setVisible(isUsingDDE); |
| 2028 | 2036 | Menu::getInstance()->getActionForOption(MenuOption::CalibrateCamera)->setVisible(isUsingDDE); |