History

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

samcake committed 8 years ago

Commit f8acca72 parents 39edcb6 5be2f0a177 files · +5758 −627Browse files

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

Unified · Split

interface/src/Application.cpp+6−20
@@ -2007,20 +2007,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 2006 unmodified lines
20072007 connect(_window, SIGNAL(windowMinimizedChanged(bool)), this, SLOT(windowMinimizedChanged(bool)));
20082008 qCDebug(interfaceapp, "Startup time: %4.2f seconds.", (double)startupTimer.elapsed() / 1000.0);
20092009
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−
20242010 EntityTreeRenderer::setEntitiesShouldFadeFunction([this]() {
20252011 SharedNodePointer entityServerNode = DependencyManager::get<NodeList>()->soloNodeOfType(NodeType::EntityServer);
20262012 return entityServerNode && !isPhysicsEnabled();
@@ -2472,7 +2458,6 @@ void Application::initializeGL() { · 445 unmodified lines
24722458 DeadlockWatchdogThread::withPause([&] {
24732459 // Set up the render engine
24742460 render::CullFunctor cullFunctor = LODManager::shouldRender;
2475− static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
24762461 _renderEngine->addJob<UpdateSceneTask>("UpdateScene");
24772462 #ifndef Q_OS_ANDROID
24782463 _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraJob", cullFunctor, !DISABLE_DEFERRED);
@@ -5455,7 +5440,7 @@ void Application::update(float deltaTime) { · 2976 unmodified lines
54555440
54565441 editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) {
54575442 PerformanceTimer perfTimer("editRenderArgs");
5458− appRenderArgs._headPose= getHMDSensorPose();
5443+ appRenderArgs._headPose = getHMDSensorPose();
54595444
54605445 auto myAvatar = getMyAvatar();
54615446
@@ -5475,10 +5460,10 @@ void Application::update(float deltaTime) { · 13 unmodified lines
54755460 {
54765461 QMutexLocker viewLocker(&_viewMutex);
54775462 // adjust near clip plane to account for sensor scaling.
5478− auto adjustedProjection = glm::perspective(_viewFrustum.getFieldOfView(),
5479− _viewFrustum.getAspectRatio(),
5480− DEFAULT_NEAR_CLIP * sensorToWorldScale,
5481− _viewFrustum.getFarClip());
5463+ auto adjustedProjection = glm::perspective(glm::radians(_fieldOfView.get()),
5464+ getActiveDisplayPlugin()->getRecommendedAspectRatio(),
5465+ DEFAULT_NEAR_CLIP * sensorToWorldScale,
5466+ DEFAULT_FAR_CLIP);
54825467 _viewFrustum.setProjection(adjustedProjection);
54835468 _viewFrustum.calculate();
54845469 }
@@ -5560,6 +5545,7 @@ void Application::update(float deltaTime) { · 75 unmodified lines
55605545 {
55615546 QMutexLocker viewLocker(&_viewMutex);
55625547 _myCamera.loadViewFrustum(_displayViewFrustum);
5548+ appRenderArgs._view = glm::inverse(_displayViewFrustum.getView());
55635549 }
55645550
55655551 {