History

Merge branch 'master' of github.com:highfidelity/hifi into remap-keybaord

Dante Ruiz committed 8 years ago

Commit 00fa5cf2 parents f521a12 5be2f0a272 files · +6547 −1144Browse files

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

Unified · Split

interface/src/Application.cpp+15−20
@@ -981,6 +981,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 980 unmodified lines
981981 qInstallMessageHandler(messageHandler);
982982
983983 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");
984993 _window->setWindowTitle("High Fidelity Interface");
985994
986995 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
19982007 connect(_window, SIGNAL(windowMinimizedChanged(bool)), this, SLOT(windowMinimizedChanged(bool)));
19992008 qCDebug(interfaceapp, "Startup time: %4.2f seconds.", (double)startupTimer.elapsed() / 1000.0);
20002009
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−
20152010 EntityTreeRenderer::setEntitiesShouldFadeFunction([this]() {
20162011 SharedNodePointer entityServerNode = DependencyManager::get<NodeList>()->soloNodeOfType(NodeType::EntityServer);
20172012 return entityServerNode && !isPhysicsEnabled();
@@ -2461,7 +2456,6 @@ void Application::initializeGL() { · 443 unmodified lines
24612456 DeadlockWatchdogThread::withPause([&] {
24622457 // Set up the render engine
24632458 render::CullFunctor cullFunctor = LODManager::shouldRender;
2464− static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
24652459 _renderEngine->addJob<UpdateSceneTask>("UpdateScene");
24662460 #ifndef Q_OS_ANDROID
24672461 _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraJob", cullFunctor, !DISABLE_DEFERRED);
@@ -5422,7 +5416,7 @@ void Application::update(float deltaTime) { · 2954 unmodified lines
54225416
54235417 editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) {
54245418 PerformanceTimer perfTimer("editRenderArgs");
5425− appRenderArgs._headPose= getHMDSensorPose();
5419+ appRenderArgs._headPose = getHMDSensorPose();
54265420
54275421 auto myAvatar = getMyAvatar();
54285422
@@ -5442,10 +5436,10 @@ void Application::update(float deltaTime) { · 13 unmodified lines
54425436 {
54435437 QMutexLocker viewLocker(&_viewMutex);
54445438 // 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);
54495443 _viewFrustum.setProjection(adjustedProjection);
54505444 _viewFrustum.calculate();
54515445 }
@@ -5527,6 +5521,7 @@ void Application::update(float deltaTime) { · 75 unmodified lines
55275521 {
55285522 QMutexLocker viewLocker(&_viewMutex);
55295523 _myCamera.loadViewFrustum(_displayViewFrustum);
5524+ appRenderArgs._view = glm::inverse(_displayViewFrustum.getView());
55305525 }
55315526
55325527 {