History

Merge pull request #12407 from NissimHadar/shadowControlsOffZvork

Shadow control for zones, models and shapes

John Conklin II committed 8 years ago

Commit 3201d2b2 parents c0f2090 3150b9637 files · +284 −147Browse files

Showing the changes to interface/src/Menu.cpp (1 of 37 files). Show all

Unified · Split

interface/src/Menu.cpp+10−4
@@ -43,6 +43,7 @@ · 42 unmodified lines
4343 #include "ui/StandAloneJSConsole.h"
4444 #include "InterfaceLogging.h"
4545 #include "LocationBookmarks.h"
46+#include "DeferredLightingEffect.h"
4647
4748 #if defined(Q_OS_MAC) || defined(Q_OS_WIN)
4849 #include "SpeechRecognizer.h"
@@ -361,10 +362,15 @@ Menu::Menu() { · 312 unmodified lines
361362 MenuWrapper* developerMenu = addMenu("Developer", "Developer");
362363
363364 // Developer > Graphics...
364− action = addActionToQMenuAndActionHash(developerMenu, "Graphics...");
365− connect(action, &QAction::triggered, [] {
366− qApp->showDialog(QString("hifi/dialogs/GraphicsPreferencesDialog.qml"),
367− QString("hifi/tablet/TabletGraphicsPreferences.qml"), "GraphicsPreferencesDialog");
365+ MenuWrapper* graphicsOptionsMenu = developerMenu->addMenu("Render");
366+ action = addCheckableActionToQMenuAndActionHash(graphicsOptionsMenu, MenuOption::Shadows, 0, true);
367+ connect(action, &QAction::triggered, [action] {
368+ DependencyManager::get<DeferredLightingEffect>()->setShadowMapEnabled(action->isChecked());
369+ });
370+
371+ action = addCheckableActionToQMenuAndActionHash(graphicsOptionsMenu, MenuOption::AmbientOcclusion, 0, false);
372+ connect(action, &QAction::triggered, [action] {
373+ DependencyManager::get<DeferredLightingEffect>()->setAmbientOcclusionEnabled(action->isChecked());
368374 });
369375
370376 // Developer > UI >>>

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t