History

Merge branch 'master' of https://github.com/highfidelity/hifi into brown

samcake committed 9 years ago

Commit 2df6d0d2 parents 3393456 1e42878123 files · +6440 −577Browse files

Showing the changes to interface/src/Application.cpp (1 of 123 files). Show all

Unified · Split

interface/src/Application.cpp+8−6
@@ -1438,15 +1438,17 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1437 unmodified lines
14381438 connect(_window, SIGNAL(windowMinimizedChanged(bool)), this, SLOT(windowMinimizedChanged(bool)));
14391439 qCDebug(interfaceapp, "Startup time: %4.2f seconds.", (double)startupTimer.elapsed() / 1000.0);
14401440
1441− auto textureCache = DependencyManager::get<TextureCache>();
1441+ {
1442+ PROFILE_RANGE(render, "Process Default Skybox");
1443+ auto textureCache = DependencyManager::get<TextureCache>();
14421444
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";
14451446
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;
14481449
1449− _defaultSkybox->setCubemap(_defaultSkyboxTexture);
1450+ _defaultSkybox->setCubemap(_defaultSkyboxTexture);
1451+ }
14501452
14511453 EntityItem::setEntitiesShouldFadeFunction([this]() {
14521454 SharedNodePointer entityServerNode = DependencyManager::get<NodeList>()->soloNodeOfType(NodeType::EntityServer);