make use delta frustum in culling the default behavior

This commit is contained in:
ZappoMan 2013-10-23 05:30:15 -07:00
parent 370fe3dad9
commit 1786049710
3 changed files with 6 additions and 6 deletions

View file

@ -291,7 +291,7 @@ Menu::Menu() :
false, appInstance->getVoxels(), SLOT(setUseFastVoxelPipeline(bool)));
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DontRemoveOutOfView);
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::HideOutOfView);
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::UseDeltaFrustumInHide);
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::UseFullFrustumInHide);
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DisableConstantCulling);
@ -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::DisableConstantCulling};
bool oldModeValue[] = { false, false, false, false, true };
bool newModeValue[] = { true, true, true, true, false };
MenuOption::UseFullFrustumInHide, MenuOption::DisableConstantCulling};
bool oldModeValue[] = { false, false, false, true, true };
bool newModeValue[] = { true, true, true, false, false };
for (int i = 0; i < sizeof(menus) / sizeof(menus[0]); i++) {
bool desiredValue = oldMode ? oldModeValue[i] : newModeValue[i];

View file

@ -216,7 +216,7 @@ namespace MenuOption {
const QString TreeStats = "Calculate Tree Stats";
const QString TransmitterDrive = "Transmitter Drive";
const QString Quit = "Quit";
const QString UseDeltaFrustumInHide = "Use Delta View Frustums when Culling";
const QString UseFullFrustumInHide = "Use Full View Frustums when Culling";
const QString UseVoxelShader = "Use Voxel Shader";
const QString VoxelsAsPoints = "Draw Voxels as Points";
const QString Voxels = "Voxels";

View file

@ -1810,7 +1810,7 @@ void VoxelSystem::hideOutOfView() {
bool showDebugDetails = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
PerformanceWarning warn(showDebugDetails, "hideOutOfView()", showDebugDetails);
bool widenFrustum = true;
bool wantDeltaFrustums = Menu::getInstance()->isOptionChecked(MenuOption::UseDeltaFrustumInHide);
bool wantDeltaFrustums = !Menu::getInstance()->isOptionChecked(MenuOption::UseFullFrustumInHide);
hideOutOfViewArgs args(this, this->_tree, _culledOnce, widenFrustum, wantDeltaFrustums);
const bool wantViewFrustumDebugging = false; // change to true for additional debugging