Showing the changes to interface/src/Application.cpp (1 of 123 files). Show all
Unified · Split
| @@ -1438,15 +1438,17 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1437 unmodified lines | ||
| 1438 | 1438 | connect(_window, SIGNAL(windowMinimizedChanged(bool)), this, SLOT(windowMinimizedChanged(bool))); |
| 1439 | 1439 | qCDebug(interfaceapp, "Startup time: %4.2f seconds.", (double)startupTimer.elapsed() / 1000.0); |
| 1440 | 1440 | |
| 1441 | − auto textureCache = DependencyManager::get<TextureCache>(); | |
| 1441 | + { | |
| 1442 | + PROFILE_RANGE(render, "Process Default Skybox"); | |
| 1443 | + auto textureCache = DependencyManager::get<TextureCache>(); | |
| 1442 | 1444 | |
| 1443 | − QString skyboxUrl { PathUtils::resourcesPath() + "images/Default-Sky-9-cubemap.jpg" }; | |
| 1444 | − QString skyboxAmbientUrl { PathUtils::resourcesPath() + "images/Default-Sky-9-ambient.jpg" }; | |
| 1445 | + auto skyboxUrl = PathUtils::resourcesPath().toStdString() + "images/Default-Sky-9-cubemap.ktx"; | |
| 1445 | 1446 | |
| 1446 | − _defaultSkyboxTexture = textureCache->getImageTexture(skyboxUrl, image::TextureUsage::CUBE_TEXTURE, { { "generateIrradiance", false } }); | |
| 1447 | − _defaultSkyboxAmbientTexture = textureCache->getImageTexture(skyboxAmbientUrl, image::TextureUsage::CUBE_TEXTURE, { { "generateIrradiance", true } }); | |
| 1447 | + _defaultSkyboxTexture = gpu::Texture::unserialize(skyboxUrl); | |
| 1448 | + _defaultSkyboxAmbientTexture = _defaultSkyboxTexture; | |
| 1448 | 1449 | |
| 1449 | − _defaultSkybox->setCubemap(_defaultSkyboxTexture); | |
| 1450 | + _defaultSkybox->setCubemap(_defaultSkyboxTexture); | |
| 1451 | + } | |
| 1450 | 1452 | |
| 1451 | 1453 | EntityItem::setEntitiesShouldFadeFunction([this]() { |
| 1452 | 1454 | SharedNodePointer entityServerNode = DependencyManager::get<NodeList>()->soloNodeOfType(NodeType::EntityServer); |