From 370fe3dad98b6f471e6cf9888a36ca1606e47691 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 23 Oct 2013 05:22:29 -0700 Subject: [PATCH] make constant culling the default mode --- interface/src/Menu.cpp | 8 ++++---- interface/src/Menu.h | 2 +- interface/src/VoxelSystem.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index 5a217a71b0..1017bb9c52 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -292,7 +292,7 @@ Menu::Menu() : addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DontRemoveOutOfView); addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::HideOutOfView); addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::UseDeltaFrustumInHide); - addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::ConstantCulling); + addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DisableConstantCulling); QMenu* avatarOptionsMenu = developerMenu->addMenu("Avatar Options"); @@ -1115,9 +1115,9 @@ void Menu::setNewVoxelCullingMode(bool newMode) { /// voxel culling mode. void Menu::setVoxelCullingMode(bool oldMode) { const QString menus[] = { MenuOption::FastVoxelPipeline, MenuOption::DontRemoveOutOfView, MenuOption::HideOutOfView, - MenuOption::UseDeltaFrustumInHide, MenuOption::ConstantCulling}; - bool oldModeValue[] = { false, false, false, false, false }; - bool newModeValue[] = { true, true, true, true, true }; + MenuOption::UseDeltaFrustumInHide, MenuOption::DisableConstantCulling}; + bool oldModeValue[] = { false, false, false, false, true }; + bool newModeValue[] = { true, true, true, true, false }; for (int i = 0; i < sizeof(menus) / sizeof(menus[0]); i++) { bool desiredValue = oldMode ? oldModeValue[i] : newModeValue[i]; diff --git a/interface/src/Menu.h b/interface/src/Menu.h index 798b74c362..83ab23d154 100644 --- a/interface/src/Menu.h +++ b/interface/src/Menu.h @@ -134,7 +134,6 @@ namespace MenuOption { const QString Bandwidth = "Bandwidth Display"; const QString BandwidthDetails = "Bandwidth Details"; const QString Collisions = "Collisions"; - const QString ConstantCulling = "Constant Culling"; const QString CopyVoxels = "Copy"; const QString CoverageMap = "Render Coverage Map"; const QString CoverageMapV2 = "Render Coverage Map V2"; @@ -144,6 +143,7 @@ namespace MenuOption { const QString DeleteVoxels = "Delete"; const QString DestructiveAddVoxel = "Create Voxel is Destructive"; const QString DeltaSending = "Delta Sending"; + const QString DisableConstantCulling = "Disable Constant Culling"; const QString DisplayFrustum = "Display Frustum"; const QString DontRenderVoxels = "Don't call _voxels.render()"; const QString DontCallOpenGLForVoxels = "Don't call glDrawElements()/glDrawRangeElementsEXT() for Voxels"; diff --git a/interface/src/VoxelSystem.cpp b/interface/src/VoxelSystem.cpp index 6ae97a52b9..5461983f9a 100644 --- a/interface/src/VoxelSystem.cpp +++ b/interface/src/VoxelSystem.cpp @@ -744,7 +744,7 @@ void VoxelSystem::checkForCulling() { uint64_t start = usecTimestampNow(); uint64_t sinceLastViewCulling = (start - _lastViewCulling) / 1000; - bool constantCulling = Menu::getInstance()->isOptionChecked(MenuOption::ConstantCulling); + bool constantCulling = !Menu::getInstance()->isOptionChecked(MenuOption::DisableConstantCulling); // If the view frustum is no longer changing, but has changed, since last time, then remove nodes that are out of view if (constantCulling || (