History

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

samcake committed 9 years ago

Commit 653ce892 parents ebc4745 ddce665151 files · +1345 −902Browse files

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

Unified · Split

interface/src/Application.cpp+2−19
@@ -115,6 +115,7 @@ · 114 unmodified lines
115#include <RenderDeferredTask.h>115#include <RenderDeferredTask.h>
116#include <RenderForwardTask.h>116#include <RenderForwardTask.h>
117#include <RenderViewTask.h>117#include <RenderViewTask.h>
118#include <SecondaryCamera.h>
118#include <ResourceCache.h>119#include <ResourceCache.h>
119#include <ResourceRequest.h>120#include <ResourceRequest.h>
120#include <SandboxUtils.h>121#include <SandboxUtils.h>
@@ -580,7 +581,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 459 unmodified lines
580 _undoStackScriptingInterface(&_undoStack),581 _undoStackScriptingInterface(&_undoStack),
581 _entitySimulation(new PhysicalEntitySimulation()),582 _entitySimulation(new PhysicalEntitySimulation()),
582 _physicsEngine(new PhysicsEngine(Vectors::ZERO)),583 _physicsEngine(new PhysicsEngine(Vectors::ZERO)),
583 _entityClipboardRenderer(false, this, this),
584 _entityClipboard(new EntityTree()),584 _entityClipboard(new EntityTree()),
585 _lastQueriedTime(usecTimestampNow()),585 _lastQueriedTime(usecTimestampNow()),
586 _previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION),586 _previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION),
@@ -1874,6 +1874,7 @@ void Application::initializeGL() { · 1287 unmodified lines
1874 render::CullFunctor cullFunctor = LODManager::shouldRender;1874 render::CullFunctor cullFunctor = LODManager::shouldRender;
1875 static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";1875 static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
1876 bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);1876 bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);
1877 _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraFrame", cullFunctor);
1877 _renderEngine->addJob<RenderViewTask>("RenderMainView", cullFunctor, isDeferred);1878 _renderEngine->addJob<RenderViewTask>("RenderMainView", cullFunctor, isDeferred);
1878 _renderEngine->load();1879 _renderEngine->load();
1879 _renderEngine->registerScene(_main3DScene);1880 _renderEngine->registerScene(_main3DScene);
@@ -3987,11 +3988,6 @@ void Application::init() { · 2107 unmodified lines
3987 DependencyManager::get<NodeList>()->sendDomainServerCheckIn();3988 DependencyManager::get<NodeList>()->sendDomainServerCheckIn();
3988 3989
3989 getEntities()->init();3990 getEntities()->init();
3990 {
3991 QMutexLocker viewLocker(&_viewMutex);
3992 getEntities()->setViewFrustum(_viewFrustum);
3993 }
3994
3995 getEntities()->setEntityLoadingPriorityFunction([this](const EntityItem& item) {3991 getEntities()->setEntityLoadingPriorityFunction([this](const EntityItem& item) {
3996 auto dims = item.getDimensions();3992 auto dims = item.getDimensions();
3997 auto maxSize = glm::compMax(dims);3993 auto maxSize = glm::compMax(dims);
@@ -4021,13 +4017,6 @@ void Application::init() { · 23 unmodified lines
4021 // of events related clicking, hovering over, and entering entities4017 // of events related clicking, hovering over, and entering entities
4022 getEntities()->connectSignalsToSlots(entityScriptingInterface.data());4018 getEntities()->connectSignalsToSlots(entityScriptingInterface.data());
4023 4019
4024 _entityClipboardRenderer.init();
4025 {
4026 QMutexLocker viewLocker(&_viewMutex);
4027 _entityClipboardRenderer.setViewFrustum(_viewFrustum);
4028 }
4029 _entityClipboardRenderer.setTree(_entityClipboard);
4030
4031 // Make sure any new sounds are loaded as soon as know about them.4020 // Make sure any new sounds are loaded as soon as know about them.
4032 connect(tree.get(), &EntityTree::newCollisionSoundURL, this, [this](QUrl newURL, EntityItemID id) {4021 connect(tree.get(), &EntityTree::newCollisionSoundURL, this, [this](QUrl newURL, EntityItemID id) {
4033 EntityTreePointer tree = getEntities()->getTree();4022 EntityTreePointer tree = getEntities()->getTree();
@@ -5020,9 +5009,6 @@ QRect Application::getDesirableApplicationGeometry() const { · 986 unmodified lines
5020 return applicationGeometry;5009 return applicationGeometry;
5021}5010}
5022 5011
5023// FIXME, preprocessor guard this check to occur only in DEBUG builds
5024static QThread * activeRenderingThread = nullptr;
5025
5026PickRay Application::computePickRay(float x, float y) const {5012PickRay Application::computePickRay(float x, float y) const {
5027 vec2 pickPoint { x, y };5013 vec2 pickPoint { x, y };
5028 PickRay result;5014 PickRay result;
@@ -5093,7 +5079,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 64 unmodified lines
5093 auto myAvatar = getMyAvatar();5079 auto myAvatar = getMyAvatar();
5094 myAvatar->preDisplaySide(renderArgs);5080 myAvatar->preDisplaySide(renderArgs);
5095 5081
5096 activeRenderingThread = QThread::currentThread();
5097 PROFILE_RANGE(render, __FUNCTION__);5082 PROFILE_RANGE(render, __FUNCTION__);
5098 PerformanceTimer perfTimer("display");5083 PerformanceTimer perfTimer("display");
5099 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::displaySide()");5084 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::displaySide()");
@@ -5163,8 +5148,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 63 unmodified lines
5163 // Before the deferred pass, let's try to use the render engine5148 // Before the deferred pass, let's try to use the render engine
5164 _renderEngine->run();5149 _renderEngine->run();
5165 }5150 }
5166
5167 activeRenderingThread = nullptr;
5168}5151}
5169 5152
5170void Application::resetSensors(bool andReload) {5153void Application::resetSensors(bool andReload) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t