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 | 981 | qInstallMessageHandler(messageHandler); |
| 982 | 982 | |
| 983 | 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 | 993 | _window->setWindowTitle("High Fidelity Interface"); |
| 985 | 994 | |
| 986 | 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 | 2007 | connect(_window, SIGNAL(windowMinimizedChanged(bool)), this, SLOT(windowMinimizedChanged(bool))); |
| 1999 | 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 | 2010 | EntityTreeRenderer::setEntitiesShouldFadeFunction([this]() { |
| 2016 | 2011 | SharedNodePointer entityServerNode = DependencyManager::get<NodeList>()->soloNodeOfType(NodeType::EntityServer); |
| 2017 | 2012 | return entityServerNode && !isPhysicsEnabled(); |
| @@ -2461,7 +2456,6 @@ void Application::initializeGL() { · 443 unmodified lines | ||
| 2461 | 2456 | DeadlockWatchdogThread::withPause([&] { |
| 2462 | 2457 | // Set up the render engine |
| 2463 | 2458 | render::CullFunctor cullFunctor = LODManager::shouldRender; |
| 2464 | − static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD"; | |
| 2465 | 2459 | _renderEngine->addJob<UpdateSceneTask>("UpdateScene"); |
| 2466 | 2460 | #ifndef Q_OS_ANDROID |
| 2467 | 2461 | _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraJob", cullFunctor, !DISABLE_DEFERRED); |
| @@ -5422,7 +5416,7 @@ void Application::update(float deltaTime) { · 2954 unmodified lines | ||
| 5422 | 5416 | |
| 5423 | 5417 | editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) { |
| 5424 | 5418 | PerformanceTimer perfTimer("editRenderArgs"); |
| 5425 | − appRenderArgs._headPose= getHMDSensorPose(); | |
| 5419 | + appRenderArgs._headPose = getHMDSensorPose(); | |
| 5426 | 5420 | |
| 5427 | 5421 | auto myAvatar = getMyAvatar(); |
| 5428 | 5422 | |
| @@ -5442,10 +5436,10 @@ void Application::update(float deltaTime) { · 13 unmodified lines | ||
| 5442 | 5436 | { |
| 5443 | 5437 | QMutexLocker viewLocker(&_viewMutex); |
| 5444 | 5438 | // adjust near clip plane to account for sensor scaling. |
| 5445 | − auto adjustedProjection = glm::perspective(_viewFrustum.getFieldOfView(), | |
| 5446 | − _viewFrustum.getAspectRatio(), | |
| 5447 | − DEFAULT_NEAR_CLIP * sensorToWorldScale, | |
| 5448 | − _viewFrustum.getFarClip()); | |
| 5439 | + auto adjustedProjection = glm::perspective(glm::radians(_fieldOfView.get()), | |
| 5440 | + getActiveDisplayPlugin()->getRecommendedAspectRatio(), | |
| 5441 | + DEFAULT_NEAR_CLIP * sensorToWorldScale, | |
| 5442 | + DEFAULT_FAR_CLIP); | |
| 5449 | 5443 | _viewFrustum.setProjection(adjustedProjection); |
| 5450 | 5444 | _viewFrustum.calculate(); |
| 5451 | 5445 | } |
| @@ -5527,6 +5521,7 @@ void Application::update(float deltaTime) { · 75 unmodified lines | ||
| 5527 | 5521 | { |
| 5528 | 5522 | QMutexLocker viewLocker(&_viewMutex); |
| 5529 | 5523 | _myCamera.loadViewFrustum(_displayViewFrustum); |
| 5524 | + appRenderArgs._view = glm::inverse(_displayViewFrustum.getView()); | |
| 5530 | 5525 | } |
| 5531 | 5526 | |
| 5532 | 5527 | { |