From ec7e1df8c0ae2d0f720481bdf8b0fc1beacdcaac Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 10 Jul 2015 15:47:46 -0700 Subject: [PATCH] Move and rename menu item --- interface/src/Application.cpp | 2 +- interface/src/Application.h | 2 +- interface/src/Menu.cpp | 3 ++- interface/src/Menu.h | 2 +- libraries/model/src/model/Skybox.cpp | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 140656bc16..1281b12a53 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2415,7 +2415,7 @@ void Application::cameraMenuChanged() { } } -void Application::clearCacheAndRestart() { +void Application::reloadResourceCaches() { emptyLocalCache(); DependencyManager::get()->refreshAll(); diff --git a/interface/src/Application.h b/interface/src/Application.h index a4c584da50..21d5d72a54 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -454,7 +454,7 @@ public slots: void cameraMenuChanged(); - void clearCacheAndRestart(); + void reloadResourceCaches(); private slots: void clearDomainOctreeDetails(); diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 7808840232..ee9f7491ac 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -127,7 +127,6 @@ Menu::Menu() { addActionToQMenuAndActionHash(fileMenu, MenuOption::CopyPath, 0, addressManager.data(), SLOT(copyPath())); - addActionToQMenuAndActionHash(fileMenu, MenuOption::ClearCacheAndRestart, 0, qApp, SLOT(clearCacheAndRestart())); addActionToQMenuAndActionHash(fileMenu, MenuOption::Quit, Qt::CTRL | Qt::Key_Q, @@ -257,6 +256,8 @@ Menu::Menu() { avatar, SLOT(updateMotionBehavior())); MenuWrapper* viewMenu = addMenu("View"); + + addActionToQMenuAndActionHash(viewMenu, MenuOption::ReloadContent, 0, qApp, SLOT(reloadResourceCaches())); addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::Fullscreen, diff --git a/interface/src/Menu.h b/interface/src/Menu.h index aa8e3f7a2a..9387a97c69 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -160,7 +160,6 @@ namespace MenuOption { const QString CalibrateCamera = "Calibrate Camera"; const QString CenterPlayerInView = "Center Player In View"; const QString Chat = "Chat..."; - const QString ClearCacheAndRestart = "Clear Cache and Restart"; const QString Collisions = "Collisions"; const QString Console = "Console..."; const QString ControlWithSpeech = "Control With Speech"; @@ -231,6 +230,7 @@ namespace MenuOption { const QString Preferences = "Preferences..."; const QString Quit = "Quit"; const QString ReloadAllScripts = "Reload All Scripts"; + const QString ReloadContent = "Reload Content (Clears all caches)"; const QString RenderBoundingCollisionShapes = "Show Bounding Collision Shapes"; const QString RenderFocusIndicator = "Show Eye Focus"; const QString RenderHeadCollisionShapes = "Show Head Collision Shapes"; diff --git a/libraries/model/src/model/Skybox.cpp b/libraries/model/src/model/Skybox.cpp index a02c646668..5be3412c6c 100755 --- a/libraries/model/src/model/Skybox.cpp +++ b/libraries/model/src/model/Skybox.cpp @@ -101,7 +101,7 @@ void Skybox::render(gpu::Batch& batch, const ViewFrustum& viewFrustum, const Sky batch.setModelTransform(Transform()); // only for Mac batch.setPipeline(thePipeline); batch.setInputBuffer(gpu::Stream::POSITION, theBuffer, 0, 8); - batch.setUniformBuffer(SKYBOX_CONSTANTS_SLOT, theConstants, 0, theConstants->getSize()); + //batch.setUniformBuffer(SKYBOX_CONSTANTS_SLOT, theConstants, 0, theConstants->getSize()); batch.setInputFormat(theFormat); batch.setUniformTexture(0, skybox.getCubemap()); batch.draw(gpu::TRIANGLE_STRIP, 4);