Decentralize asset synchronization

This commit is contained in:
Emil Axelsson
2017-11-16 15:09:55 +01:00
parent 816de9b29a
commit 7c80384d12
11 changed files with 149 additions and 332 deletions

View File

@@ -412,8 +412,7 @@ void OpenSpaceEngine::create(int argc, char** argv,
// Set up asset loader
_engine->_assetManager = std::make_unique<AssetManager>(
std::make_unique<AssetLoader>(*OsEng.scriptEngine().luaState(), "${ASSETS}"),
std::make_unique<AssetSynchronizer>()
std::make_unique<AssetLoader>(*OsEng.scriptEngine().luaState(), "${ASSETS}")
);
//_engine->_globalPropertyNamespace->addPropertySubOwner(_engine->_assetLoader->rootAsset());
}
@@ -601,7 +600,7 @@ void OpenSpaceEngine::loadSingleAsset(const std::string& assetPath) {
_renderEngine->setScene(_scene.get());
_assetManager->clearAllTargetAssets();
_assetManager->setTargetAssetState(assetPath, AssetManager::AssetState::Initialized);
_assetManager->setTargetAssetState(assetPath, Asset::State::Initialized);
bool showMessage = true;
std::string kMessage =