mirror of
https://github.com/JulianGro/overte.git
synced 2025-06-02 11:20:21 +02:00
Merge pull request #1537 from ZappoMan/stephens_requests
added option to disable local cache file
This commit is contained in:
commit
d7388c2288
3 changed files with 226 additions and 216 deletions
|
@ -1416,8 +1416,10 @@ void Application::terminate() {
|
||||||
_voxelHideShowThread.terminate();
|
_voxelHideShowThread.terminate();
|
||||||
_voxelEditSender.terminate();
|
_voxelEditSender.terminate();
|
||||||
_particleEditSender.terminate();
|
_particleEditSender.terminate();
|
||||||
|
if (_persistThread) {
|
||||||
_persistThread->terminate();
|
_persistThread->terminate();
|
||||||
_persistThread = NULL;
|
_persistThread = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static Avatar* processAvatarMessageHeader(unsigned char*& packetData, size_t& dataBytes) {
|
static Avatar* processAvatarMessageHeader(unsigned char*& packetData, size_t& dataBytes) {
|
||||||
|
@ -2260,6 +2262,7 @@ void Application::updateMouseVoxels(float deltaTime, glm::vec3& mouseRayOrigin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Application::updateHandAndTouch(float deltaTime) {
|
void Application::updateHandAndTouch(float deltaTime) {
|
||||||
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
|
||||||
PerformanceWarning warn(showWarnings, "Application::updateHandAndTouch()");
|
PerformanceWarning warn(showWarnings, "Application::updateHandAndTouch()");
|
||||||
|
@ -2303,8 +2306,10 @@ void Application::updateThreads(float deltaTime) {
|
||||||
_voxelHideShowThread.threadRoutine();
|
_voxelHideShowThread.threadRoutine();
|
||||||
_voxelEditSender.threadRoutine();
|
_voxelEditSender.threadRoutine();
|
||||||
_particleEditSender.threadRoutine();
|
_particleEditSender.threadRoutine();
|
||||||
|
if (_persistThread) {
|
||||||
_persistThread->threadRoutine();
|
_persistThread->threadRoutine();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::updateMyAvatarSimulation(float deltaTime) {
|
void Application::updateMyAvatarSimulation(float deltaTime) {
|
||||||
|
@ -4392,10 +4397,13 @@ void Application::updateLocalOctreeCache(bool firstTime) {
|
||||||
|
|
||||||
QString localVoxelCacheFileName = getLocalVoxelCacheFileName();
|
QString localVoxelCacheFileName = getLocalVoxelCacheFileName();
|
||||||
const int LOCAL_CACHE_PERSIST_INTERVAL = 1000 * 10; // every 10 seconds
|
const int LOCAL_CACHE_PERSIST_INTERVAL = 1000 * 10; // every 10 seconds
|
||||||
|
|
||||||
|
if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableLocalVoxelCache)) {
|
||||||
_persistThread = new OctreePersistThread(_voxels.getTree(),
|
_persistThread = new OctreePersistThread(_voxels.getTree(),
|
||||||
localVoxelCacheFileName.toLocal8Bit().constData(),LOCAL_CACHE_PERSIST_INTERVAL);
|
localVoxelCacheFileName.toLocal8Bit().constData(),LOCAL_CACHE_PERSIST_INTERVAL);
|
||||||
|
|
||||||
qDebug() << "updateLocalOctreeCache()... localVoxelCacheFileName=" << localVoxelCacheFileName;
|
qDebug() << "updateLocalOctreeCache()... localVoxelCacheFileName=" << localVoxelCacheFileName;
|
||||||
|
}
|
||||||
|
|
||||||
if (_persistThread) {
|
if (_persistThread) {
|
||||||
_voxels.beginLoadingLocalVoxelCache(); // while local voxels are importing, don't do individual node VBO updates
|
_voxels.beginLoadingLocalVoxelCache(); // while local voxels are importing, don't do individual node VBO updates
|
||||||
|
|
|
@ -311,6 +311,7 @@ Menu::Menu() :
|
||||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::AmbientOcclusion);
|
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::AmbientOcclusion);
|
||||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DontFadeOnVoxelServerChanges);
|
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DontFadeOnVoxelServerChanges);
|
||||||
addActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::LodTools, Qt::SHIFT | Qt::Key_L, this, SLOT(lodTools()));
|
addActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::LodTools, Qt::SHIFT | Qt::Key_L, this, SLOT(lodTools()));
|
||||||
|
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DisableLocalVoxelCache);
|
||||||
|
|
||||||
QMenu* voxelProtoOptionsMenu = voxelOptionsMenu->addMenu("Voxel Server Protocol Options");
|
QMenu* voxelProtoOptionsMenu = voxelOptionsMenu->addMenu("Voxel Server Protocol Options");
|
||||||
|
|
||||||
|
|
|
@ -171,6 +171,7 @@ namespace MenuOption {
|
||||||
const QString DestructiveAddVoxel = "Create Voxel is Destructive";
|
const QString DestructiveAddVoxel = "Create Voxel is Destructive";
|
||||||
const QString DisableColorVoxels = "Disable Colored Voxels";
|
const QString DisableColorVoxels = "Disable Colored Voxels";
|
||||||
const QString DisableDeltaSending = "Disable Delta Sending";
|
const QString DisableDeltaSending = "Disable Delta Sending";
|
||||||
|
const QString DisableLocalVoxelCache = "Disable Local Voxel Cache";
|
||||||
const QString DisableLowRes = "Disable Lower Resolution While Moving";
|
const QString DisableLowRes = "Disable Lower Resolution While Moving";
|
||||||
const QString DisplayFrustum = "Display Frustum";
|
const QString DisplayFrustum = "Display Frustum";
|
||||||
const QString DisplayLeapHands = "Display Leap Hands";
|
const QString DisplayLeapHands = "Display Leap Hands";
|
||||||
|
|
Loading…
Reference in a new issue