mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 06:53:46 +02:00
more menu cleanup removing developer options that are now defunct
This commit is contained in:
parent
de26b950f8
commit
d13ebf6095
5 changed files with 10 additions and 59 deletions
|
@ -1771,7 +1771,7 @@ void Application::init() {
|
|||
_voxels.setMaxVoxels(Menu::getInstance()->getMaxVoxels());
|
||||
_voxels.setUseVoxelShader(Menu::getInstance()->isOptionChecked(MenuOption::UseVoxelShader));
|
||||
_voxels.setVoxelsAsPoints(Menu::getInstance()->isOptionChecked(MenuOption::VoxelsAsPoints));
|
||||
_voxels.setDisableFastVoxelPipeline(Menu::getInstance()->isOptionChecked(MenuOption::DisableFastVoxelPipeline));
|
||||
_voxels.setDisableFastVoxelPipeline(false);
|
||||
_voxels.init();
|
||||
|
||||
|
||||
|
@ -3609,7 +3609,7 @@ void Application::displayStats() {
|
|||
// Voxel Rendering
|
||||
voxelStats.str("");
|
||||
voxelStats.precision(4);
|
||||
voxelStats << "Voxel Rendering Slots" <<
|
||||
voxelStats << "Voxel Rendering Slots " <<
|
||||
"Max: " << _voxels.getMaxVoxels() / 1000.f << "K " <<
|
||||
"Drawn: " << _voxels.getVoxelsWritten() / 1000.f << "K " <<
|
||||
"Abandoned: " << _voxels.getAbandonedVoxels() / 1000.f << "K ";
|
||||
|
|
|
@ -305,23 +305,6 @@ Menu::Menu() :
|
|||
addCheckableActionToQMenuAndActionHash(voxelProtoOptionsMenu, MenuOption::EnableOcclusionCulling);
|
||||
addCheckableActionToQMenuAndActionHash(voxelProtoOptionsMenu, MenuOption::DestructiveAddVoxel);
|
||||
|
||||
QMenu* cullingOptionsMenu = voxelOptionsMenu->addMenu("Culling Options");
|
||||
addDisabledActionAndSeparator(cullingOptionsMenu, "Standard Settings");
|
||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::OldVoxelCullingMode, 0,
|
||||
false, this, SLOT(setOldVoxelCullingMode(bool)));
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::NewVoxelCullingMode, 0,
|
||||
false, this, SLOT(setNewVoxelCullingMode(bool)));
|
||||
|
||||
addDisabledActionAndSeparator(cullingOptionsMenu, "Individual Option Settings");
|
||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DisableFastVoxelPipeline, 0,
|
||||
false, appInstance->getVoxels(), SLOT(setDisableFastVoxelPipeline(bool)));
|
||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DisableHideOutOfView);
|
||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::RemoveOutOfView);
|
||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::UseFullFrustumInHide);
|
||||
addCheckableActionToQMenuAndActionHash(cullingOptionsMenu, MenuOption::DisableConstantCulling);
|
||||
|
||||
|
||||
QMenu* avatarOptionsMenu = developerMenu->addMenu("Avatar Options");
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(avatarOptionsMenu, MenuOption::Avatars, 0, true);
|
||||
|
@ -1138,30 +1121,3 @@ void Menu::updateFrustumRenderModeAction() {
|
|||
}
|
||||
}
|
||||
|
||||
void Menu::setOldVoxelCullingMode(bool oldMode) {
|
||||
setVoxelCullingMode(oldMode);
|
||||
}
|
||||
|
||||
void Menu::setNewVoxelCullingMode(bool newMode) {
|
||||
setVoxelCullingMode(!newMode);
|
||||
}
|
||||
|
||||
/// This will switch on or off several different individual settings options all at once based on choosing with Old or New
|
||||
/// voxel culling mode.
|
||||
void Menu::setVoxelCullingMode(bool oldMode) {
|
||||
const QString menus[] = { MenuOption::DisableFastVoxelPipeline, MenuOption::RemoveOutOfView, MenuOption::DisableHideOutOfView,
|
||||
MenuOption::UseFullFrustumInHide, MenuOption::DisableConstantCulling};
|
||||
bool oldModeValue[] = { true, true, true, true, true };
|
||||
bool newModeValue[] = { false, false, false, false, false };
|
||||
|
||||
for (int i = 0; i < sizeof(menus) / sizeof(menus[0]); i++) {
|
||||
bool desiredValue = oldMode ? oldModeValue[i] : newModeValue[i];
|
||||
if (isOptionChecked(menus[i]) != desiredValue) {
|
||||
triggerOption(menus[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// set the checkmarks accordingly...
|
||||
_actionHash.value(MenuOption::OldVoxelCullingMode)->setChecked(oldMode);
|
||||
_actionHash.value(MenuOption::NewVoxelCullingMode)->setChecked(!oldMode);
|
||||
}
|
||||
|
|
|
@ -93,8 +93,6 @@ private slots:
|
|||
void chooseVoxelPaintColor();
|
||||
void runTests();
|
||||
void resetSwatchColors();
|
||||
void setOldVoxelCullingMode(bool oldMode);
|
||||
void setNewVoxelCullingMode(bool newMode);
|
||||
|
||||
private:
|
||||
static Menu* _instance;
|
||||
|
@ -124,7 +122,6 @@ private:
|
|||
const char* member = NULL);
|
||||
|
||||
void updateFrustumRenderModeAction();
|
||||
void setVoxelCullingMode(bool oldMode);
|
||||
|
||||
QHash<QString, QAction*> _actionHash;
|
||||
int _audioJitterBufferSamples; /// number of extra samples to wait before starting audio playback
|
||||
|
@ -162,9 +159,7 @@ namespace MenuOption {
|
|||
const QString DeleteVoxels = "Delete";
|
||||
const QString DestructiveAddVoxel = "Create Voxel is Destructive";
|
||||
const QString DisableColorVoxels = "Disable Colored Voxels";
|
||||
const QString DisableConstantCulling = "Disable Constant Culling";
|
||||
const QString DisableDeltaSending = "Disable Delta Sending";
|
||||
const QString DisableFastVoxelPipeline = "Disable Fast Voxel Pipeline";
|
||||
const QString DisableLowRes = "Disable Lower Resolution While Moving";
|
||||
const QString DisplayFrustum = "Display Frustum";
|
||||
const QString DisplayLeapHands = "Display Leap Hands";
|
||||
|
@ -193,7 +188,6 @@ namespace MenuOption {
|
|||
const QString GlowMode = "Cycle Glow Mode";
|
||||
const QString GoToDomain = "Go To Domain...";
|
||||
const QString GoToLocation = "Go To Location...";
|
||||
const QString DisableHideOutOfView = "Disable Hide Out of View Voxels";
|
||||
const QString GoToUser = "Go To User...";
|
||||
const QString ImportVoxels = "Import Voxels";
|
||||
const QString ImportVoxelsClipboard = "Import Voxels to Clipboard";
|
||||
|
@ -224,7 +218,6 @@ namespace MenuOption {
|
|||
const QString PipelineWarnings = "Show Render Pipeline Warnings";
|
||||
const QString Preferences = "Preferences...";
|
||||
const QString RandomizeVoxelColors = "Randomize Voxel TRUE Colors";
|
||||
const QString RemoveOutOfView = "Instead of Hide Remove Out of View Voxels";
|
||||
const QString ResetAvatarSize = "Reset Avatar Size";
|
||||
const QString ResetSwatchColors = "Reset Swatch Colors";
|
||||
const QString RunTimingTests = "Run Timing Tests";
|
||||
|
@ -244,7 +237,6 @@ namespace MenuOption {
|
|||
const QString TreeStats = "Calculate Tree Stats";
|
||||
const QString TransmitterDrive = "Transmitter Drive";
|
||||
const QString Quit = "Quit";
|
||||
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";
|
||||
|
|
|
@ -774,7 +774,10 @@ void VoxelSystem::checkForCulling() {
|
|||
uint64_t start = usecTimestampNow();
|
||||
uint64_t sinceLastViewCulling = (start - _lastViewCulling) / 1000;
|
||||
|
||||
bool constantCulling = !Menu::getInstance()->isOptionChecked(MenuOption::DisableConstantCulling);
|
||||
// These items used to be menu options, we are not defaulting to and only supporting these modes.
|
||||
bool constantCulling = true;
|
||||
bool performHideOutOfViewLogic = true;
|
||||
bool performRemoveOutOfViewLogic = false;
|
||||
|
||||
// If the view frustum is no longer changing, but has changed, since last time, then remove nodes that are out of view
|
||||
if (constantCulling || (
|
||||
|
@ -785,7 +788,7 @@ void VoxelSystem::checkForCulling() {
|
|||
// 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
|
||||
// can be expensive).
|
||||
if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableHideOutOfView)) {
|
||||
if (performHideOutOfViewLogic) {
|
||||
|
||||
// track how long its been since we were last moving. If we have recently moved then only use delta frustums, if
|
||||
// it's been a long time since we last moved, then go ahead and do a full frustum cull.
|
||||
|
@ -819,7 +822,7 @@ void VoxelSystem::checkForCulling() {
|
|||
_lastViewCullingElapsed = (endViewCulling - start) / 1000;
|
||||
}
|
||||
|
||||
} else if (Menu::getInstance()->isOptionChecked(MenuOption::RemoveOutOfView)) {
|
||||
} else if (performRemoveOutOfViewLogic) {
|
||||
_lastViewCulling = start;
|
||||
removeOutOfView();
|
||||
uint64_t endViewCulling = usecTimestampNow();
|
||||
|
@ -1943,7 +1946,7 @@ void VoxelSystem::hideOutOfView(bool forceFullFrustum) {
|
|||
// Both these problems are solved by intermittently calling this with forceFullFrustum set
|
||||
// to true. This will essentially clean up the improperly hidden or shown voxels.
|
||||
//
|
||||
bool wantDeltaFrustums = !forceFullFrustum && !Menu::getInstance()->isOptionChecked(MenuOption::UseFullFrustumInHide);
|
||||
bool wantDeltaFrustums = !forceFullFrustum;
|
||||
hideOutOfViewArgs args(this, this->_tree, _culledOnce, widenFrustum, wantDeltaFrustums);
|
||||
|
||||
const bool wantViewFrustumDebugging = false; // change to true for additional debugging
|
||||
|
|
|
@ -36,7 +36,7 @@ const float MAX_LOD_SIZE_MULTIPLIER = 2000.0f;
|
|||
const int NUMBER_OF_CHILDREN = 8;
|
||||
|
||||
const int MAX_TREE_SLICE_BYTES = 26;
|
||||
const int DEFAULT_MAX_VOXELS_PER_SYSTEM = 200000;
|
||||
const int DEFAULT_MAX_VOXELS_PER_SYSTEM = 500000;
|
||||
const int VERTICES_PER_VOXEL = 24; // 6 sides * 4 corners per side
|
||||
const int VERTEX_POINTS_PER_VOXEL = 3 * VERTICES_PER_VOXEL; // xyz for each VERTICE_PER_VOXEL
|
||||
const int INDICES_PER_VOXEL = 3 * 12; // 6 sides * 2 triangles per size * 3 vertices per triangle
|
||||
|
|
Loading…
Reference in a new issue