mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-16 17:00:22 +02:00
clear the skybox between scenes
This commit is contained in:
parent
5e82093e69
commit
996346980d
1 changed files with 8 additions and 2 deletions
|
@ -113,17 +113,19 @@ void EntityTreeRenderer::resetEntitiesScriptEngine() {
|
||||||
void EntityTreeRenderer::clear() {
|
void EntityTreeRenderer::clear() {
|
||||||
leaveAllEntities();
|
leaveAllEntities();
|
||||||
|
|
||||||
|
// unload and stop the engine
|
||||||
if (_entitiesScriptEngine) {
|
if (_entitiesScriptEngine) {
|
||||||
// Unload and stop the engine here (instead of in its deleter) to
|
// do this here (instead of in deleter) to avoid marshalling unload signals back to this thread
|
||||||
// avoid marshalling unload signals back to this thread
|
|
||||||
_entitiesScriptEngine->unloadAllEntityScripts();
|
_entitiesScriptEngine->unloadAllEntityScripts();
|
||||||
_entitiesScriptEngine->stop();
|
_entitiesScriptEngine->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reset the engine
|
||||||
if (_wantScripts && !_shuttingDown) {
|
if (_wantScripts && !_shuttingDown) {
|
||||||
resetEntitiesScriptEngine();
|
resetEntitiesScriptEngine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove all entities from the scene
|
||||||
auto scene = _viewState->getMain3DScene();
|
auto scene = _viewState->getMain3DScene();
|
||||||
render::PendingChanges pendingChanges;
|
render::PendingChanges pendingChanges;
|
||||||
foreach(auto entity, _entitiesInScene) {
|
foreach(auto entity, _entitiesInScene) {
|
||||||
|
@ -132,6 +134,10 @@ void EntityTreeRenderer::clear() {
|
||||||
scene->enqueuePendingChanges(pendingChanges);
|
scene->enqueuePendingChanges(pendingChanges);
|
||||||
_entitiesInScene.clear();
|
_entitiesInScene.clear();
|
||||||
|
|
||||||
|
// reset the zone to the default (while we load the next scene)
|
||||||
|
_bestZone = nullptr;
|
||||||
|
applyZonePropertiesToScene(_bestZone);
|
||||||
|
|
||||||
OctreeRenderer::clear();
|
OctreeRenderer::clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue