Showing the changes to interface/src/Application.cpp (1 of 177 files). Show all
Unified · Split
| @@ -2007,20 +2007,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 2006 unmodified lines | |||
| 2007 | connect(_window, SIGNAL(windowMinimizedChanged(bool)), this, SLOT(windowMinimizedChanged(bool))); | 2007 | connect(_window, SIGNAL(windowMinimizedChanged(bool)), this, SLOT(windowMinimizedChanged(bool))); |
| 2008 | qCDebug(interfaceapp, "Startup time: %4.2f seconds.", (double)startupTimer.elapsed() / 1000.0); | 2008 | qCDebug(interfaceapp, "Startup time: %4.2f seconds.", (double)startupTimer.elapsed() / 1000.0); |
| 2009 | 2009 | ||
| 2010 | { | ||
| 2011 | PROFILE_RANGE(render, "Process Default Skybox"); | ||
| 2012 | auto textureCache = DependencyManager::get<TextureCache>(); | ||
| 2013 | |||
| 2014 | QFileSelector fileSelector; | ||
| 2015 | fileSelector.setExtraSelectors(FileUtils::getFileSelectors()); | ||
| 2016 | auto skyboxUrl = fileSelector.select(PathUtils::resourcesPath() + "images/Default-Sky-9-cubemap.ktx"); | ||
| 2017 | |||
| 2018 | _defaultSkyboxTexture = gpu::Texture::unserialize(skyboxUrl.toStdString()); | ||
| 2019 | _defaultSkyboxAmbientTexture = _defaultSkyboxTexture; | ||
| 2020 | |||
| 2021 | _defaultSkybox->setCubemap(_defaultSkyboxTexture); | ||
| 2022 | } | ||
| 2023 | |||
| 2024 | EntityTreeRenderer::setEntitiesShouldFadeFunction([this]() { | 2010 | EntityTreeRenderer::setEntitiesShouldFadeFunction([this]() { |
| 2025 | SharedNodePointer entityServerNode = DependencyManager::get<NodeList>()->soloNodeOfType(NodeType::EntityServer); | 2011 | SharedNodePointer entityServerNode = DependencyManager::get<NodeList>()->soloNodeOfType(NodeType::EntityServer); |
| 2026 | return entityServerNode && !isPhysicsEnabled(); | 2012 | return entityServerNode && !isPhysicsEnabled(); |
| @@ -2472,7 +2458,6 @@ void Application::initializeGL() { · 445 unmodified lines | |||
| 2472 | DeadlockWatchdogThread::withPause([&] { | 2458 | DeadlockWatchdogThread::withPause([&] { |
| 2473 | // Set up the render engine | 2459 | // Set up the render engine |
| 2474 | render::CullFunctor cullFunctor = LODManager::shouldRender; | 2460 | render::CullFunctor cullFunctor = LODManager::shouldRender; |
| 2475 | static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD"; | ||
| 2476 | _renderEngine->addJob<UpdateSceneTask>("UpdateScene"); | 2461 | _renderEngine->addJob<UpdateSceneTask>("UpdateScene"); |
| 2477 | #ifndef Q_OS_ANDROID | 2462 | #ifndef Q_OS_ANDROID |
| 2478 | _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraJob", cullFunctor, !DISABLE_DEFERRED); | 2463 | _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraJob", cullFunctor, !DISABLE_DEFERRED); |
| @@ -5455,7 +5440,7 @@ void Application::update(float deltaTime) { · 2976 unmodified lines | |||
| 5455 | 5440 | ||
| 5456 | editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) { | 5441 | editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) { |
| 5457 | PerformanceTimer perfTimer("editRenderArgs"); | 5442 | PerformanceTimer perfTimer("editRenderArgs"); |
| 5458 | appRenderArgs._headPose= getHMDSensorPose(); | 5443 | appRenderArgs._headPose = getHMDSensorPose(); |
| 5459 | 5444 | ||
| 5460 | auto myAvatar = getMyAvatar(); | 5445 | auto myAvatar = getMyAvatar(); |
| 5461 | 5446 | ||
| @@ -5475,10 +5460,10 @@ void Application::update(float deltaTime) { · 13 unmodified lines | |||
| 5475 | { | 5460 | { |
| 5476 | QMutexLocker viewLocker(&_viewMutex); | 5461 | QMutexLocker viewLocker(&_viewMutex); |
| 5477 | // adjust near clip plane to account for sensor scaling. | 5462 | // adjust near clip plane to account for sensor scaling. |
| 5478 | auto adjustedProjection = glm::perspective(_viewFrustum.getFieldOfView(), | 5463 | auto adjustedProjection = glm::perspective(glm::radians(_fieldOfView.get()), |
| 5479 | _viewFrustum.getAspectRatio(), | 5464 | getActiveDisplayPlugin()->getRecommendedAspectRatio(), |
| 5480 | DEFAULT_NEAR_CLIP * sensorToWorldScale, | 5465 | DEFAULT_NEAR_CLIP * sensorToWorldScale, |
| 5481 | _viewFrustum.getFarClip()); | 5466 | DEFAULT_FAR_CLIP); |
| 5482 | _viewFrustum.setProjection(adjustedProjection); | 5467 | _viewFrustum.setProjection(adjustedProjection); |
| 5483 | _viewFrustum.calculate(); | 5468 | _viewFrustum.calculate(); |
| 5484 | } | 5469 | } |
| @@ -5560,6 +5545,7 @@ void Application::update(float deltaTime) { · 75 unmodified lines | |||
| 5560 | { | 5545 | { |
| 5561 | QMutexLocker viewLocker(&_viewMutex); | 5546 | QMutexLocker viewLocker(&_viewMutex); |
| 5562 | _myCamera.loadViewFrustum(_displayViewFrustum); | 5547 | _myCamera.loadViewFrustum(_displayViewFrustum); |
| 5548 | appRenderArgs._view = glm::inverse(_displayViewFrustum.getView()); | ||
| 5563 | } | 5549 | } |
| 5564 | 5550 | ||
| 5565 | { | 5551 | { |