mirror of
https://github.com/overte-org/overte.git
synced 2025-08-14 11:09:38 +02:00
clean up more menu items
This commit is contained in:
parent
8d53fc9671
commit
b7f62eabf0
4 changed files with 19 additions and 39 deletions
|
@ -1517,8 +1517,8 @@ void Application::init() {
|
|||
|
||||
// Set up VoxelSystem after loading preferences so we can get the desired max voxel count
|
||||
_voxels.setMaxVoxels(Menu::getInstance()->getMaxVoxels());
|
||||
_voxels.setUseVoxelShader(Menu::getInstance()->isOptionChecked(MenuOption::UseVoxelShader));
|
||||
_voxels.setVoxelsAsPoints(Menu::getInstance()->isOptionChecked(MenuOption::VoxelsAsPoints));
|
||||
_voxels.setUseVoxelShader(false);
|
||||
_voxels.setVoxelsAsPoints(false);
|
||||
_voxels.setDisableFastVoxelPipeline(false);
|
||||
_voxels.init();
|
||||
|
||||
|
@ -1914,7 +1914,7 @@ void Application::updateMyAvatar(float deltaTime) {
|
|||
// actually need to calculate the view frustum planes to send these details
|
||||
// to the server.
|
||||
loadViewFrustum(_myCamera, _viewFrustum);
|
||||
|
||||
|
||||
// Update my voxel servers with my current voxel query...
|
||||
queryOctree(NodeType::VoxelServer, PacketTypeVoxelQuery, _voxelServerJurisdictions);
|
||||
queryOctree(NodeType::ParticleServer, PacketTypeParticleQuery, _particleServerJurisdictions);
|
||||
|
@ -1927,6 +1927,8 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node
|
|||
return;
|
||||
}
|
||||
|
||||
//qDebug() << ">>> inside... queryOctree()... _viewFrustum.getFieldOfView()=" << _viewFrustum.getFieldOfView();
|
||||
|
||||
bool wantExtraDebugging = getLogger()->extraDebugging();
|
||||
|
||||
// These will be the same for all servers, so we can set them up once and then reuse for each server we send to.
|
||||
|
@ -1986,7 +1988,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node
|
|||
}
|
||||
}
|
||||
|
||||
if (wantExtraDebugging && unknownJurisdictionServers > 0) {
|
||||
if (wantExtraDebugging) {
|
||||
qDebug("Servers: total %d, in view %d, unknown jurisdiction %d",
|
||||
totalServers, inViewServers, unknownJurisdictionServers);
|
||||
}
|
||||
|
@ -2007,7 +2009,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node
|
|||
}
|
||||
}
|
||||
|
||||
if (wantExtraDebugging && unknownJurisdictionServers > 0) {
|
||||
if (wantExtraDebugging) {
|
||||
qDebug("perServerPPS: %d perUnknownServer: %d", perServerPPS, perUnknownServer);
|
||||
}
|
||||
|
||||
|
@ -2338,14 +2340,13 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) {
|
|||
if (Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) {
|
||||
PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
|
||||
"Application::displaySide() ... voxels...");
|
||||
if (!Menu::getInstance()->isOptionChecked(MenuOption::DontRenderVoxels)) {
|
||||
_voxels.render();
|
||||
|
||||
// double check that our LOD doesn't need to be auto-adjusted
|
||||
// only adjust if our option is set
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::AutoAdjustLOD)) {
|
||||
Menu::getInstance()->autoAdjustLOD(_fps);
|
||||
}
|
||||
|
||||
_voxels.render();
|
||||
|
||||
// double check that our LOD doesn't need to be auto-adjusted
|
||||
// adjust it unless we were asked to disable this feature
|
||||
if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableAutoAdjustLOD)) {
|
||||
Menu::getInstance()->autoAdjustLOD(_fps);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -238,23 +238,12 @@ Menu::Menu() :
|
|||
true,
|
||||
appInstance,
|
||||
SLOT(setRenderVoxels(bool)));
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DontRenderVoxels);
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DontCallOpenGLForVoxels);
|
||||
|
||||
_useVoxelShader = addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::UseVoxelShader, 0,
|
||||
false, appInstance->getVoxels(), SLOT(setUseVoxelShader(bool)));
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::VoxelsAsPoints, 0,
|
||||
false, appInstance->getVoxels(), SLOT(setVoxelsAsPoints(bool)));
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::VoxelTextures);
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::AmbientOcclusion);
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DontFadeOnVoxelServerChanges);
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::AutoAdjustLOD);
|
||||
addActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::LodTools, Qt::SHIFT | Qt::Key_L, this, SLOT(lodTools()));
|
||||
|
||||
QMenu* voxelProtoOptionsMenu = voxelOptionsMenu->addMenu("Voxel Server Protocol Options");
|
||||
addCheckableActionToQMenuAndActionHash(voxelProtoOptionsMenu, MenuOption::DestructiveAddVoxel);
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DontFadeOnVoxelServerChanges);
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DisableAutoAdjustLOD);
|
||||
|
||||
QMenu* avatarOptionsMenu = developerMenu->addMenu("Avatar Options");
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ namespace MenuOption {
|
|||
const QString AmbientOcclusion = "Ambient Occlusion";
|
||||
const QString Avatars = "Avatars";
|
||||
const QString Atmosphere = "Atmosphere";
|
||||
const QString AutoAdjustLOD = "Automatically Adjust LOD";
|
||||
const QString DisableAutoAdjustLOD = "Disable Automatically Adjusting LOD";
|
||||
const QString AutomaticallyAuditTree = "Automatically Audit Tree Stats";
|
||||
const QString Bandwidth = "Bandwidth Display";
|
||||
const QString BandwidthDetails = "Bandwidth Details";
|
||||
|
@ -217,13 +217,10 @@ namespace MenuOption {
|
|||
const QString CullSharedFaces = "Cull Shared Voxel Faces";
|
||||
const QString DecreaseAvatarSize = "Decrease Avatar Size";
|
||||
const QString DecreaseVoxelSize = "Decrease Voxel Size";
|
||||
const QString DestructiveAddVoxel = "Create Voxel is Destructive";
|
||||
const QString DisplayFrustum = "Display Frustum";
|
||||
const QString DisplayHands = "Display Hands";
|
||||
const QString DisplayHandTargets = "Display Hand Targets";
|
||||
const QString FilterSixense = "Smooth Sixense Movement";
|
||||
const QString DontRenderVoxels = "Don't call _voxels.render()";
|
||||
const QString DontCallOpenGLForVoxels = "Don't call glDrawRangeElementsEXT() for Voxels";
|
||||
const QString Enable3DTVMode = "Enable 3DTV Mode";
|
||||
const QString AudioNoiseReduction = "Audio Noise Reduction";
|
||||
const QString EchoServerAudio = "Echo Server Audio";
|
||||
|
@ -296,8 +293,6 @@ namespace MenuOption {
|
|||
const QString TreeStats = "Calculate Tree Stats";
|
||||
const QString TransmitterDrive = "Transmitter Drive";
|
||||
const QString Quit = "Quit";
|
||||
const QString UseVoxelShader = "Use Voxel Shader";
|
||||
const QString VoxelsAsPoints = "Draw Voxels as Points";
|
||||
const QString Voxels = "Voxels";
|
||||
const QString VoxelDrumming = "Voxel Drumming";
|
||||
const QString VoxelMode = "Cycle Voxel Mode";
|
||||
|
|
|
@ -867,7 +867,6 @@ void VoxelSystem::checkForCulling() {
|
|||
bool fullRedraw = (_lastKnownVoxelSizeScale != Menu::getInstance()->getVoxelSizeScale() ||
|
||||
_lastKnownBoundaryLevelAdjust != Menu::getInstance()->getBoundaryLevelAdjust());
|
||||
|
||||
// track that these values
|
||||
_lastKnownVoxelSizeScale = Menu::getInstance()->getVoxelSizeScale();
|
||||
_lastKnownBoundaryLevelAdjust = Menu::getInstance()->getBoundaryLevelAdjust();
|
||||
|
||||
|
@ -1386,7 +1385,6 @@ void VoxelSystem::render() {
|
|||
|
||||
updateVBOs();
|
||||
|
||||
bool dontCallOpenGLDraw = Menu::getInstance()->isOptionChecked(MenuOption::DontCallOpenGLForVoxels);
|
||||
// if not don't... then do...
|
||||
if (_useVoxelShader) {
|
||||
PerformanceWarning warn(showWarnings,"render().. _useVoxelShader openGL..");
|
||||
|
@ -1432,9 +1430,7 @@ void VoxelSystem::render() {
|
|||
|
||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _vboVoxelsIndicesID);
|
||||
|
||||
if (!dontCallOpenGLDraw) {
|
||||
glDrawElements(GL_POINTS, _voxelsInReadArrays, GL_UNSIGNED_INT, BUFFER_OFFSET(0)); //The starting point of the IBO
|
||||
}
|
||||
glDrawElements(GL_POINTS, _voxelsInReadArrays, GL_UNSIGNED_INT, BUFFER_OFFSET(0)); //The starting point of the IBO
|
||||
|
||||
// deactivate vertex and color arrays after drawing
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
|
@ -1477,7 +1473,7 @@ void VoxelSystem::render() {
|
|||
|
||||
// draw voxels in 6 passes
|
||||
|
||||
if (!dontCallOpenGLDraw) {
|
||||
{
|
||||
PerformanceWarning warn(showWarnings, "render().. glDrawRangeElementsEXT()...");
|
||||
|
||||
glNormal3f(0,1.0f,0);
|
||||
|
@ -1510,7 +1506,6 @@ void VoxelSystem::render() {
|
|||
glDrawRangeElementsEXT(GL_TRIANGLES, 0, GLOBAL_NORMALS_VERTICES_PER_VOXEL * _voxelsInReadArrays - 1,
|
||||
INDICES_PER_FACE * _voxelsInReadArrays, GL_UNSIGNED_INT, 0);
|
||||
}
|
||||
|
||||
{
|
||||
PerformanceWarning warn(showWarnings, "render().. cleanup after glDrawRangeElementsEXT()...");
|
||||
|
||||
|
|
Loading…
Reference in a new issue