mirror of
https://github.com/overte-org/overte.git
synced 2025-08-13 04:26:10 +02:00
remove local cache option
This commit is contained in:
parent
5fdec5a18d
commit
f657a3efe9
4 changed files with 2 additions and 68 deletions
|
@ -154,8 +154,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
|||
_resetRecentMaxPacketsSoon(true),
|
||||
_swatch(NULL),
|
||||
_pasteMode(false),
|
||||
_logger(new FileLogger(this)),
|
||||
_persistThread(NULL)
|
||||
_logger(new FileLogger(this))
|
||||
{
|
||||
_myAvatar = _avatarManager.getMyAvatar();
|
||||
|
||||
|
@ -316,12 +315,7 @@ Application::~Application() {
|
|||
_voxelHideShowThread.terminate();
|
||||
_voxelEditSender.terminate();
|
||||
_particleEditSender.terminate();
|
||||
if (_persistThread) {
|
||||
_persistThread->terminate();
|
||||
_persistThread->deleteLater();
|
||||
_persistThread = NULL;
|
||||
}
|
||||
|
||||
|
||||
storeSizeAndPosition();
|
||||
saveScripts();
|
||||
_sharedVoxelSystem.changeTree(new VoxelTree);
|
||||
|
@ -1907,9 +1901,6 @@ void Application::init() {
|
|||
connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView()));
|
||||
connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView()));
|
||||
connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors()));
|
||||
|
||||
|
||||
updateLocalOctreeCache(true);
|
||||
}
|
||||
|
||||
void Application::closeMirrorView() {
|
||||
|
@ -2207,9 +2198,6 @@ void Application::updateThreads(float deltaTime) {
|
|||
_voxelHideShowThread.threadRoutine();
|
||||
_voxelEditSender.threadRoutine();
|
||||
_particleEditSender.threadRoutine();
|
||||
if (_persistThread) {
|
||||
_persistThread->threadRoutine();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3882,10 +3870,6 @@ void Application::domainChanged(const QString& domainHostname) {
|
|||
|
||||
// reset the particle renderer
|
||||
_particles.clear();
|
||||
|
||||
// reset our persist thread
|
||||
qDebug() << "Domain changed to" << domainHostname << ". Swapping persist cache.";
|
||||
updateLocalOctreeCache();
|
||||
}
|
||||
|
||||
void Application::nodeKilled(SharedNodePointer node) {
|
||||
|
@ -4155,49 +4139,6 @@ void Application::initAvatarAndViewFrustum() {
|
|||
updateMyAvatar(0.f);
|
||||
}
|
||||
|
||||
QString Application::getLocalVoxelCacheFileName() {
|
||||
QString fileName = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||
QDir logDir(fileName);
|
||||
if (!logDir.exists(fileName)) {
|
||||
logDir.mkdir(fileName);
|
||||
}
|
||||
|
||||
fileName.append(QString("/hifi.voxelscache."));
|
||||
fileName.append(_profile.getLastDomain());
|
||||
fileName.append(QString(".svo"));
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
|
||||
void Application::updateLocalOctreeCache(bool firstTime) {
|
||||
// only do this if we've already got a persistThread or we're told this is the first time
|
||||
if (firstTime || _persistThread) {
|
||||
|
||||
if (_persistThread) {
|
||||
_persistThread->terminate();
|
||||
_persistThread->deleteLater();
|
||||
_persistThread = NULL;
|
||||
}
|
||||
|
||||
QString localVoxelCacheFileName = getLocalVoxelCacheFileName();
|
||||
const int LOCAL_CACHE_PERSIST_INTERVAL = 1000 * 10; // every 10 seconds
|
||||
|
||||
if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableLocalVoxelCache)) {
|
||||
_persistThread = new OctreePersistThread(_voxels.getTree(),
|
||||
localVoxelCacheFileName.toLocal8Bit().constData(),LOCAL_CACHE_PERSIST_INTERVAL);
|
||||
|
||||
qDebug() << "updateLocalOctreeCache()... localVoxelCacheFileName=" << localVoxelCacheFileName;
|
||||
}
|
||||
|
||||
if (_persistThread) {
|
||||
_voxels.beginLoadingLocalVoxelCache(); // while local voxels are importing, don't do individual node VBO updates
|
||||
connect(_persistThread, SIGNAL(loadCompleted()), &_voxels, SLOT(localVoxelCacheLoaded()));
|
||||
_persistThread->initialize(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Application::checkVersion() {
|
||||
QNetworkRequest latestVersionRequest((QUrl(CHECK_VERSION_URL)));
|
||||
latestVersionRequest.setAttribute(QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferCache);
|
||||
|
|
|
@ -484,11 +484,6 @@ private:
|
|||
|
||||
FileLogger* _logger;
|
||||
|
||||
OctreePersistThread* _persistThread;
|
||||
|
||||
QString getLocalVoxelCacheFileName();
|
||||
void updateLocalOctreeCache(bool firstTime = false);
|
||||
|
||||
void checkVersion();
|
||||
void displayUpdateDialog();
|
||||
bool shouldSkipVersion(QString latestVersion);
|
||||
|
|
|
@ -317,7 +317,6 @@ Menu::Menu() :
|
|||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::AmbientOcclusion);
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DontFadeOnVoxelServerChanges);
|
||||
addActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::LodTools, Qt::SHIFT | Qt::Key_L, this, SLOT(lodTools()));
|
||||
addCheckableActionToQMenuAndActionHash(voxelOptionsMenu, MenuOption::DisableLocalVoxelCache);
|
||||
|
||||
QMenu* voxelProtoOptionsMenu = voxelOptionsMenu->addMenu("Voxel Server Protocol Options");
|
||||
|
||||
|
|
|
@ -176,7 +176,6 @@ namespace MenuOption {
|
|||
const QString DestructiveAddVoxel = "Create Voxel is Destructive";
|
||||
const QString DisableColorVoxels = "Disable Colored Voxels";
|
||||
const QString DisableDeltaSending = "Disable Delta Sending";
|
||||
const QString DisableLocalVoxelCache = "Disable Local Voxel Cache";
|
||||
const QString DisableLowRes = "Disable Lower Resolution While Moving";
|
||||
const QString DisplayFrustum = "Display Frustum";
|
||||
const QString DisplayLeapHands = "Display Leap Hands";
|
||||
|
|
Loading…
Reference in a new issue