give Application a 'workload' engine

This commit is contained in:
Andrew Meadows 2018-02-12 16:21:53 -08:00
parent 7342bc84f5
commit ba888a14ca
2 changed files with 6 additions and 0 deletions

View file

@ -2209,6 +2209,7 @@ Application::~Application() {
// shutdown render engine
_main3DScene = nullptr;
_renderEngine = nullptr;
_infinityEngine = nullptr;
DependencyManager::destroy<Preferences>();
@ -4097,6 +4098,9 @@ void Application::idle() {
qFatal("Unable to make main thread context current");
}
{
_infinityEngine->run();
}
{
PerformanceTimer perfTimer("update");
PerformanceWarning warn(showWarnings, "Application::idle()... update()");

View file

@ -69,6 +69,7 @@
#include "ui/OverlayConductor.h"
#include "ui/overlays/Overlays.h"
#include "UndoStackScriptingInterface.h"
#include "workload/Engine.h"
#include <procedural/ProceduralSkybox.h>
#include <graphics/Skybox.h>
@ -612,6 +613,7 @@ private:
render::ScenePointer _main3DScene{ new render::Scene(glm::vec3(-0.5f * (float)TREE_SCALE), (float)TREE_SCALE) };
render::EnginePointer _renderEngine{ new render::Engine() };
gpu::ContextPointer _gpuContext; // initialized during window creation
workload::EnginePointer _infinityEngine{ new workload::Engine() };
mutable QMutex _renderArgsMutex{ QMutex::Recursive };
struct AppRenderArgs {