mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 00:56:45 +02:00
make HideOutOfView the default behavior
This commit is contained in:
parent
1786049710
commit
3c8e30c956
4 changed files with 6 additions and 7 deletions
|
@ -290,7 +290,7 @@ Menu::Menu() :
|
||||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::FastVoxelPipeline, 0,
|
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::FastVoxelPipeline, 0,
|
||||||
false, appInstance->getVoxels(), SLOT(setUseFastVoxelPipeline(bool)));
|
false, appInstance->getVoxels(), SLOT(setUseFastVoxelPipeline(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DontRemoveOutOfView);
|
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DontRemoveOutOfView);
|
||||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::HideOutOfView);
|
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DisableHideOutOfView);
|
||||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::UseFullFrustumInHide);
|
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::UseFullFrustumInHide);
|
||||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DisableConstantCulling);
|
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DisableConstantCulling);
|
||||||
|
|
||||||
|
@ -1114,10 +1114,10 @@ void Menu::setNewVoxelCullingMode(bool newMode) {
|
||||||
/// This will switch on or off several different individual settings options all at once based on choosing with Old or New
|
/// This will switch on or off several different individual settings options all at once based on choosing with Old or New
|
||||||
/// voxel culling mode.
|
/// voxel culling mode.
|
||||||
void Menu::setVoxelCullingMode(bool oldMode) {
|
void Menu::setVoxelCullingMode(bool oldMode) {
|
||||||
const QString menus[] = { MenuOption::FastVoxelPipeline, MenuOption::DontRemoveOutOfView, MenuOption::HideOutOfView,
|
const QString menus[] = { MenuOption::FastVoxelPipeline, MenuOption::DontRemoveOutOfView, MenuOption::DisableHideOutOfView,
|
||||||
MenuOption::UseFullFrustumInHide, MenuOption::DisableConstantCulling};
|
MenuOption::UseFullFrustumInHide, MenuOption::DisableConstantCulling};
|
||||||
bool oldModeValue[] = { false, false, false, true, true };
|
bool oldModeValue[] = { false, false, true, true, true };
|
||||||
bool newModeValue[] = { true, true, true, false, false };
|
bool newModeValue[] = { true, true, false, false, false };
|
||||||
|
|
||||||
for (int i = 0; i < sizeof(menus) / sizeof(menus[0]); i++) {
|
for (int i = 0; i < sizeof(menus) / sizeof(menus[0]); i++) {
|
||||||
bool desiredValue = oldMode ? oldModeValue[i] : newModeValue[i];
|
bool desiredValue = oldMode ? oldModeValue[i] : newModeValue[i];
|
||||||
|
|
|
@ -168,7 +168,7 @@ namespace MenuOption {
|
||||||
const QString GlowMode = "Cycle Glow Mode";
|
const QString GlowMode = "Cycle Glow Mode";
|
||||||
const QString GoToDomain = "Go To Domain...";
|
const QString GoToDomain = "Go To Domain...";
|
||||||
const QString GoToLocation = "Go To Location...";
|
const QString GoToLocation = "Go To Location...";
|
||||||
const QString HideOutOfView = "Hide Out of View Voxels";
|
const QString DisableHideOutOfView = "Disable Hide Out of View Voxels";
|
||||||
const QString GoToUser = "Go To User...";
|
const QString GoToUser = "Go To User...";
|
||||||
const QString ImportVoxels = "Import Voxels";
|
const QString ImportVoxels = "Import Voxels";
|
||||||
const QString ImportVoxelsClipboard = "Import Voxels to Clipboard";
|
const QString ImportVoxelsClipboard = "Import Voxels to Clipboard";
|
||||||
|
|
|
@ -757,7 +757,7 @@ void VoxelSystem::checkForCulling() {
|
||||||
// When we call removeOutOfView() voxels, we don't actually remove the voxels from the VBOs, but we do remove
|
// When we call removeOutOfView() voxels, we don't actually remove the voxels from the VBOs, but we do remove
|
||||||
// them from tree, this makes our tree caclulations faster, but doesn't require us to fully rebuild the VBOs (which
|
// them from tree, this makes our tree caclulations faster, but doesn't require us to fully rebuild the VBOs (which
|
||||||
// can be expensive).
|
// can be expensive).
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::HideOutOfView)) {
|
if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableHideOutOfView)) {
|
||||||
hideOutOfView();
|
hideOutOfView();
|
||||||
}
|
}
|
||||||
if (!Menu::getInstance()->isOptionChecked(MenuOption::DontRemoveOutOfView)) {
|
if (!Menu::getInstance()->isOptionChecked(MenuOption::DontRemoveOutOfView)) {
|
||||||
|
|
|
@ -193,7 +193,6 @@ private:
|
||||||
static bool forceRedrawEntireTreeOperation(VoxelNode* node, void* extraData);
|
static bool forceRedrawEntireTreeOperation(VoxelNode* node, void* extraData);
|
||||||
static bool clearAllNodesBufferIndexOperation(VoxelNode* node, void* extraData);
|
static bool clearAllNodesBufferIndexOperation(VoxelNode* node, void* extraData);
|
||||||
static bool hideOutOfViewOperation(VoxelNode* node, void* extraData);
|
static bool hideOutOfViewOperation(VoxelNode* node, void* extraData);
|
||||||
static bool hideOutOfViewUnrollOperation(VoxelNode* node, void* extraData);
|
|
||||||
static bool hideAllSubTreeOperation(VoxelNode* node, void* extraData);
|
static bool hideAllSubTreeOperation(VoxelNode* node, void* extraData);
|
||||||
static bool showAllSubTreeOperation(VoxelNode* node, void* extraData);
|
static bool showAllSubTreeOperation(VoxelNode* node, void* extraData);
|
||||||
static bool showAllLocalVoxelsOperation(VoxelNode* node, void* extraData);
|
static bool showAllLocalVoxelsOperation(VoxelNode* node, void* extraData);
|
||||||
|
|
Loading…
Reference in a new issue