From b2788570916b7eccb302409b4688ba9c74786a5b Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Fri, 5 Sep 2014 13:51:22 -0700 Subject: [PATCH] Wireframe option, fix for shadow menu group. --- interface/src/Application.cpp | 8 ++++++++ interface/src/Menu.cpp | 3 ++- interface/src/Menu.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 966f222c52..3f7ee7a776 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2809,6 +2809,10 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { _stars.render(whichCamera.getFieldOfView(), whichCamera.getAspectRatio(), whichCamera.getNearClip(), alpha); } + if (Menu::getInstance()->isOptionChecked(MenuOption::Wireframe)) { + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + } + // draw the sky dome if (!selfAvatarOnly && Menu::getInstance()->isOptionChecked(MenuOption::Atmosphere)) { PerformanceTimer perfTimer("atmosphere"); @@ -2947,6 +2951,10 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { _overlays.render3D(); } } + + if (Menu::getInstance()->isOptionChecked(MenuOption::Wireframe)) { + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + } } void Application::updateUntranslatedViewMatrix(const glm::vec3& viewMatrixTranslation) { diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index e78b954fd5..f95301027e 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -370,7 +370,7 @@ Menu::Menu() : shadowGroup->addAction(addCheckableActionToQMenuAndActionHash(shadowMenu, "None", 0, true)); shadowGroup->addAction(addCheckableActionToQMenuAndActionHash(shadowMenu, MenuOption::SimpleShadows, 0, false)); shadowGroup->addAction(addCheckableActionToQMenuAndActionHash(shadowMenu, MenuOption::CascadedShadows, 0, false)); - shadowGroup->addAction(addCheckableActionToQMenuAndActionHash(shadowMenu, MenuOption::AvatarsReceiveShadows, 0, true)); + addCheckableActionToQMenuAndActionHash(shadowMenu, MenuOption::AvatarsReceiveShadows, 0, true); addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::Stars, Qt::Key_Asterisk, true); @@ -386,6 +386,7 @@ Menu::Menu() : 0, appInstance->getGlowEffect(), SLOT(cycleRenderMode())); + addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::Wireframe, 0, false); addActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::LodTools, Qt::SHIFT | Qt::Key_L, this, SLOT(lodTools())); QMenu* avatarDebugMenu = developerMenu->addMenu("Avatar"); diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 42b6af5b80..dd77c50968 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -471,6 +471,7 @@ namespace MenuOption { const QString Voxels = "Voxels"; const QString VoxelTextures = "Voxel Textures"; const QString WalletPrivateKey = "Wallet Private Key..."; + const QString Wireframe = "Wireframe"; } void sendFakeEnterEvent();