Showing the changes to interface/src/Application.cpp (1 of 272 files). Show all
Unified · Split
| @@ -981,6 +981,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 980 unmodified lines | |||
| 981 | qInstallMessageHandler(messageHandler); | 981 | qInstallMessageHandler(messageHandler); |
| 982 | 982 | ||
| 983 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "styles/Inconsolata.otf"); | 983 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "styles/Inconsolata.otf"); |
| 984 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "fonts/fontawesome-webfont.ttf"); | ||
| 985 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "fonts/hifi-glyphs.ttf"); | ||
| 986 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "fonts/AnonymousPro-Regular.ttf"); | ||
| 987 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "fonts/FiraSans-Regular.ttf"); | ||
| 988 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "fonts/FiraSans-SemiBold.ttf"); | ||
| 989 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "fonts/Raleway-Light.ttf"); | ||
| 990 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "fonts/Raleway-Regular.ttf"); | ||
| 991 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "fonts/Raleway-Bold.ttf"); | ||
| 992 | QFontDatabase::addApplicationFont(PathUtils::resourcesPath() + "fonts/Raleway-SemiBold.ttf"); | ||
| 984 | _window->setWindowTitle("High Fidelity Interface"); | 993 | _window->setWindowTitle("High Fidelity Interface"); |
| 985 | 994 | ||
| 986 | Model::setAbstractViewStateInterface(this); // The model class will sometimes need to know view state details from us | 995 | Model::setAbstractViewStateInterface(this); // The model class will sometimes need to know view state details from us |
| @@ -1998,20 +2007,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1011 unmodified lines | |||
| 1998 | connect(_window, SIGNAL(windowMinimizedChanged(bool)), this, SLOT(windowMinimizedChanged(bool))); | 2007 | connect(_window, SIGNAL(windowMinimizedChanged(bool)), this, SLOT(windowMinimizedChanged(bool))); |
| 1999 | 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); |
| 2000 | 2009 | ||
| 2001 | { | ||
| 2002 | PROFILE_RANGE(render, "Process Default Skybox"); | ||
| 2003 | auto textureCache = DependencyManager::get<TextureCache>(); | ||
| 2004 | |||
| 2005 | QFileSelector fileSelector; | ||
| 2006 | fileSelector.setExtraSelectors(FileUtils::getFileSelectors()); | ||
| 2007 | auto skyboxUrl = fileSelector.select(PathUtils::resourcesPath() + "images/Default-Sky-9-cubemap.ktx"); | ||
| 2008 | |||
| 2009 | _defaultSkyboxTexture = gpu::Texture::unserialize(skyboxUrl.toStdString()); | ||
| 2010 | _defaultSkyboxAmbientTexture = _defaultSkyboxTexture; | ||
| 2011 | |||
| 2012 | _defaultSkybox->setCubemap(_defaultSkyboxTexture); | ||
| 2013 | } | ||
| 2014 | |||
| 2015 | EntityTreeRenderer::setEntitiesShouldFadeFunction([this]() { | 2010 | EntityTreeRenderer::setEntitiesShouldFadeFunction([this]() { |
| 2016 | SharedNodePointer entityServerNode = DependencyManager::get<NodeList>()->soloNodeOfType(NodeType::EntityServer); | 2011 | SharedNodePointer entityServerNode = DependencyManager::get<NodeList>()->soloNodeOfType(NodeType::EntityServer); |
| 2017 | return entityServerNode && !isPhysicsEnabled(); | 2012 | return entityServerNode && !isPhysicsEnabled(); |
| @@ -2461,7 +2456,6 @@ void Application::initializeGL() { · 443 unmodified lines | |||
| 2461 | DeadlockWatchdogThread::withPause([&] { | 2456 | DeadlockWatchdogThread::withPause([&] { |
| 2462 | // Set up the render engine | 2457 | // Set up the render engine |
| 2463 | render::CullFunctor cullFunctor = LODManager::shouldRender; | 2458 | render::CullFunctor cullFunctor = LODManager::shouldRender; |
| 2464 | static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD"; | ||
| 2465 | _renderEngine->addJob<UpdateSceneTask>("UpdateScene"); | 2459 | _renderEngine->addJob<UpdateSceneTask>("UpdateScene"); |
| 2466 | #ifndef Q_OS_ANDROID | 2460 | #ifndef Q_OS_ANDROID |
| 2467 | _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraJob", cullFunctor, !DISABLE_DEFERRED); | 2461 | _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraJob", cullFunctor, !DISABLE_DEFERRED); |
| @@ -5422,7 +5416,7 @@ void Application::update(float deltaTime) { · 2954 unmodified lines | |||
| 5422 | 5416 | ||
| 5423 | editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) { | 5417 | editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) { |
| 5424 | PerformanceTimer perfTimer("editRenderArgs"); | 5418 | PerformanceTimer perfTimer("editRenderArgs"); |
| 5425 | appRenderArgs._headPose= getHMDSensorPose(); | 5419 | appRenderArgs._headPose = getHMDSensorPose(); |
| 5426 | 5420 | ||
| 5427 | auto myAvatar = getMyAvatar(); | 5421 | auto myAvatar = getMyAvatar(); |
| 5428 | 5422 | ||
| @@ -5442,10 +5436,10 @@ void Application::update(float deltaTime) { · 13 unmodified lines | |||
| 5442 | { | 5436 | { |
| 5443 | QMutexLocker viewLocker(&_viewMutex); | 5437 | QMutexLocker viewLocker(&_viewMutex); |
| 5444 | // adjust near clip plane to account for sensor scaling. | 5438 | // adjust near clip plane to account for sensor scaling. |
| 5445 | auto adjustedProjection = glm::perspective(_viewFrustum.getFieldOfView(), | 5439 | auto adjustedProjection = glm::perspective(glm::radians(_fieldOfView.get()), |
| 5446 | _viewFrustum.getAspectRatio(), | 5440 | getActiveDisplayPlugin()->getRecommendedAspectRatio(), |
| 5447 | DEFAULT_NEAR_CLIP * sensorToWorldScale, | 5441 | DEFAULT_NEAR_CLIP * sensorToWorldScale, |
| 5448 | _viewFrustum.getFarClip()); | 5442 | DEFAULT_FAR_CLIP); |
| 5449 | _viewFrustum.setProjection(adjustedProjection); | 5443 | _viewFrustum.setProjection(adjustedProjection); |
| 5450 | _viewFrustum.calculate(); | 5444 | _viewFrustum.calculate(); |
| 5451 | } | 5445 | } |
| @@ -5527,6 +5521,7 @@ void Application::update(float deltaTime) { · 75 unmodified lines | |||
| 5527 | { | 5521 | { |
| 5528 | QMutexLocker viewLocker(&_viewMutex); | 5522 | QMutexLocker viewLocker(&_viewMutex); |
| 5529 | _myCamera.loadViewFrustum(_displayViewFrustum); | 5523 | _myCamera.loadViewFrustum(_displayViewFrustum); |
| 5524 | appRenderArgs._view = glm::inverse(_displayViewFrustum.getView()); | ||
| 5530 | } | 5525 | } |
| 5531 | 5526 | ||
| 5532 | { | 5527 | { |