Showing the changes to interface/src/Application.cpp (1 of 125 files). Show all
Unified · Split
| @@ -581,7 +581,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 580 unmodified lines | |||
| 581 | _undoStackScriptingInterface(&_undoStack), | 581 | _undoStackScriptingInterface(&_undoStack), |
| 582 | _entitySimulation(new PhysicalEntitySimulation()), | 582 | _entitySimulation(new PhysicalEntitySimulation()), |
| 583 | _physicsEngine(new PhysicsEngine(Vectors::ZERO)), | 583 | _physicsEngine(new PhysicsEngine(Vectors::ZERO)), |
| 584 | _entityClipboardRenderer(false, this, this), | ||
| 585 | _entityClipboard(new EntityTree()), | 584 | _entityClipboard(new EntityTree()), |
| 586 | _lastQueriedTime(usecTimestampNow()), | 585 | _lastQueriedTime(usecTimestampNow()), |
| 587 | _previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION), | 586 | _previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION), |
| @@ -3989,11 +3988,6 @@ void Application::init() { · 3401 unmodified lines | |||
| 3989 | DependencyManager::get<NodeList>()->sendDomainServerCheckIn(); | 3988 | DependencyManager::get<NodeList>()->sendDomainServerCheckIn(); |
| 3990 | 3989 | ||
| 3991 | getEntities()->init(); | 3990 | getEntities()->init(); |
| 3992 | { | ||
| 3993 | QMutexLocker viewLocker(&_viewMutex); | ||
| 3994 | getEntities()->setViewFrustum(_viewFrustum); | ||
| 3995 | } | ||
| 3996 | |||
| 3997 | getEntities()->setEntityLoadingPriorityFunction([this](const EntityItem& item) { | 3991 | getEntities()->setEntityLoadingPriorityFunction([this](const EntityItem& item) { |
| 3998 | auto dims = item.getDimensions(); | 3992 | auto dims = item.getDimensions(); |
| 3999 | auto maxSize = glm::compMax(dims); | 3993 | auto maxSize = glm::compMax(dims); |
| @@ -4023,13 +4017,6 @@ void Application::init() { · 23 unmodified lines | |||
| 4023 | // of events related clicking, hovering over, and entering entities | 4017 | // of events related clicking, hovering over, and entering entities |
| 4024 | getEntities()->connectSignalsToSlots(entityScriptingInterface.data()); | 4018 | getEntities()->connectSignalsToSlots(entityScriptingInterface.data()); |
| 4025 | 4019 | ||
| 4026 | _entityClipboardRenderer.init(); | ||
| 4027 | { | ||
| 4028 | QMutexLocker viewLocker(&_viewMutex); | ||
| 4029 | _entityClipboardRenderer.setViewFrustum(_viewFrustum); | ||
| 4030 | } | ||
| 4031 | _entityClipboardRenderer.setTree(_entityClipboard); | ||
| 4032 | |||
| 4033 | // 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. |
| 4034 | connect(tree.get(), &EntityTree::newCollisionSoundURL, this, [this](QUrl newURL, EntityItemID id) { | 4021 | connect(tree.get(), &EntityTree::newCollisionSoundURL, this, [this](QUrl newURL, EntityItemID id) { |
| 4035 | EntityTreePointer tree = getEntities()->getTree(); | 4022 | EntityTreePointer tree = getEntities()->getTree(); |
| @@ -5022,9 +5009,6 @@ QRect Application::getDesirableApplicationGeometry() const { · 986 unmodified lines | |||
| 5022 | return applicationGeometry; | 5009 | return applicationGeometry; |
| 5023 | } | 5010 | } |
| 5024 | 5011 | ||
| 5025 | // FIXME, preprocessor guard this check to occur only in DEBUG builds | ||
| 5026 | static QThread * activeRenderingThread = nullptr; | ||
| 5027 | |||
| 5028 | PickRay Application::computePickRay(float x, float y) const { | 5012 | PickRay Application::computePickRay(float x, float y) const { |
| 5029 | vec2 pickPoint { x, y }; | 5013 | vec2 pickPoint { x, y }; |
| 5030 | PickRay result; | 5014 | PickRay result; |
| @@ -5095,7 +5079,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 64 unmodified lines | |||
| 5095 | auto myAvatar = getMyAvatar(); | 5079 | auto myAvatar = getMyAvatar(); |
| 5096 | myAvatar->preDisplaySide(renderArgs); | 5080 | myAvatar->preDisplaySide(renderArgs); |
| 5097 | 5081 | ||
| 5098 | activeRenderingThread = QThread::currentThread(); | ||
| 5099 | PROFILE_RANGE(render, __FUNCTION__); | 5082 | PROFILE_RANGE(render, __FUNCTION__); |
| 5100 | PerformanceTimer perfTimer("display"); | 5083 | PerformanceTimer perfTimer("display"); |
| 5101 | PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::displaySide()"); | 5084 | PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::displaySide()"); |
| @@ -5168,8 +5151,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 66 unmodified lines | |||
| 5168 | // Before the deferred pass, let's try to use the render engine | 5151 | // Before the deferred pass, let's try to use the render engine |
| 5169 | _renderEngine->run(); | 5152 | _renderEngine->run(); |
| 5170 | } | 5153 | } |
| 5171 | |||
| 5172 | activeRenderingThread = nullptr; | ||
| 5173 | } | 5154 | } |
| 5174 | 5155 | ||
| 5175 | void Application::resetSensors(bool andReload) { | 5156 | void Application::resetSensors(bool andReload) { |