mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 16:38:27 +02:00
add RenderFetchSortCull task
This commit is contained in:
parent
0fa3439949
commit
ca1a14e5b0
8 changed files with 130 additions and 108 deletions
|
@ -101,6 +101,7 @@
|
||||||
#include <RecordingScriptingInterface.h>
|
#include <RecordingScriptingInterface.h>
|
||||||
#include <RenderableWebEntityItem.h>
|
#include <RenderableWebEntityItem.h>
|
||||||
#include <RenderShadowTask.h>
|
#include <RenderShadowTask.h>
|
||||||
|
#include <render/RenderFetchSortCullTask.h>
|
||||||
#include <RenderDeferredTask.h>
|
#include <RenderDeferredTask.h>
|
||||||
#include <RenderForwardTask.h>
|
#include <RenderForwardTask.h>
|
||||||
#include <ResourceCache.h>
|
#include <ResourceCache.h>
|
||||||
|
@ -1818,11 +1819,13 @@ void Application::initializeGL() {
|
||||||
// Set up the render engine
|
// Set up the render engine
|
||||||
render::CullFunctor cullFunctor = LODManager::shouldRender;
|
render::CullFunctor cullFunctor = LODManager::shouldRender;
|
||||||
_renderEngine->addJob<RenderShadowTask>("RenderShadowTask", cullFunctor);
|
_renderEngine->addJob<RenderShadowTask>("RenderShadowTask", cullFunctor);
|
||||||
|
const auto items = _renderEngine->addJob<RenderFetchSortCullTask>("FetchSortCull", cullFunctor);
|
||||||
|
assert(items.canCast<RenderFetchSortCullTask::Output>());
|
||||||
static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
|
static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
|
||||||
if (QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD)) {
|
if (QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD)) {
|
||||||
_renderEngine->addJob<RenderForwardTask>("RenderForwardTask", cullFunctor);
|
_renderEngine->addJob<RenderForwardTask>("RenderForwardTask", items.get<RenderFetchSortCullTask::Output>());
|
||||||
} else {
|
} else {
|
||||||
_renderEngine->addJob<RenderDeferredTask>("RenderDeferredTask", cullFunctor);
|
_renderEngine->addJob<RenderDeferredTask>("RenderDeferredTask", items.get<RenderFetchSortCullTask::Output>());
|
||||||
}
|
}
|
||||||
_renderEngine->load();
|
_renderEngine->load();
|
||||||
_renderEngine->registerScene(_main3DScene);
|
_renderEngine->registerScene(_main3DScene);
|
||||||
|
|
|
@ -48,49 +48,18 @@ using namespace render;
|
||||||
extern void initOverlay3DPipelines(render::ShapePlumber& plumber);
|
extern void initOverlay3DPipelines(render::ShapePlumber& plumber);
|
||||||
extern void initDeferredPipelines(render::ShapePlumber& plumber);
|
extern void initDeferredPipelines(render::ShapePlumber& plumber);
|
||||||
|
|
||||||
RenderDeferredTask::RenderDeferredTask(CullFunctor cullFunctor) {
|
RenderDeferredTask::RenderDeferredTask(RenderFetchSortCullTask::Output items) {
|
||||||
cullFunctor = cullFunctor ? cullFunctor : [](const RenderArgs*, const AABox&){ return true; };
|
|
||||||
|
|
||||||
// Prepare the ShapePipelines
|
// Prepare the ShapePipelines
|
||||||
ShapePlumberPointer shapePlumber = std::make_shared<ShapePlumber>();
|
ShapePlumberPointer shapePlumber = std::make_shared<ShapePlumber>();
|
||||||
initDeferredPipelines(*shapePlumber);
|
initDeferredPipelines(*shapePlumber);
|
||||||
|
|
||||||
// CPU jobs:
|
// Extract opaques / transparents / lights / overlays
|
||||||
// Fetch and cull the items from the scene
|
const auto opaques = items[0];
|
||||||
auto spatialFilter = ItemFilter::Builder::visibleWorldItems().withoutLayered();
|
const auto transparents = items[1];
|
||||||
const auto spatialSelection = addJob<FetchSpatialTree>("FetchSceneSelection", spatialFilter);
|
const auto lights = items[2];
|
||||||
const auto culledSpatialSelection = addJob<CullSpatialSelection>("CullSceneSelection", spatialSelection, cullFunctor, RenderDetails::ITEM, spatialFilter);
|
const auto overlayOpaques = items[3];
|
||||||
|
const auto overlayTransparents = items[4];
|
||||||
// Overlays are not culled
|
const auto background = items[5];
|
||||||
const auto nonspatialSelection = addJob<FetchNonspatialItems>("FetchOverlaySelection");
|
|
||||||
|
|
||||||
// Multi filter visible items into different buckets
|
|
||||||
const int NUM_FILTERS = 3;
|
|
||||||
const int OPAQUE_SHAPE_BUCKET = 0;
|
|
||||||
const int TRANSPARENT_SHAPE_BUCKET = 1;
|
|
||||||
const int LIGHT_BUCKET = 2;
|
|
||||||
const int BACKGROUND_BUCKET = 2;
|
|
||||||
MultiFilterItem<NUM_FILTERS>::ItemFilterArray spatialFilters = { {
|
|
||||||
ItemFilter::Builder::opaqueShape(),
|
|
||||||
ItemFilter::Builder::transparentShape(),
|
|
||||||
ItemFilter::Builder::light()
|
|
||||||
} };
|
|
||||||
MultiFilterItem<NUM_FILTERS>::ItemFilterArray nonspatialFilters = { {
|
|
||||||
ItemFilter::Builder::opaqueShape(),
|
|
||||||
ItemFilter::Builder::transparentShape(),
|
|
||||||
ItemFilter::Builder::background()
|
|
||||||
} };
|
|
||||||
const auto filteredSpatialBuckets = addJob<MultiFilterItem<NUM_FILTERS>>("FilterSceneSelection", culledSpatialSelection, spatialFilters).get<MultiFilterItem<NUM_FILTERS>::ItemBoundsArray>();
|
|
||||||
const auto filteredNonspatialBuckets = addJob<MultiFilterItem<NUM_FILTERS>>("FilterOverlaySelection", nonspatialSelection, nonspatialFilters).get<MultiFilterItem<NUM_FILTERS>::ItemBoundsArray>();
|
|
||||||
|
|
||||||
// Extract / Sort opaques / Transparents / Lights / Overlays
|
|
||||||
const auto opaques = addJob<DepthSortItems>("DepthSortOpaque", filteredSpatialBuckets[OPAQUE_SHAPE_BUCKET]);
|
|
||||||
const auto transparents = addJob<DepthSortItems>("DepthSortTransparent", filteredSpatialBuckets[TRANSPARENT_SHAPE_BUCKET], DepthSortItems(false));
|
|
||||||
const auto lights = filteredSpatialBuckets[LIGHT_BUCKET];
|
|
||||||
|
|
||||||
const auto overlayOpaques = addJob<DepthSortItems>("DepthSortOverlayOpaque", filteredNonspatialBuckets[OPAQUE_SHAPE_BUCKET]);
|
|
||||||
const auto overlayTransparents = addJob<DepthSortItems>("DepthSortOverlayTransparent", filteredNonspatialBuckets[TRANSPARENT_SHAPE_BUCKET], DepthSortItems(false));
|
|
||||||
const auto background = filteredNonspatialBuckets[BACKGROUND_BUCKET];
|
|
||||||
|
|
||||||
// Prepare deferred, generate the shared Deferred Frame Transform
|
// Prepare deferred, generate the shared Deferred Frame Transform
|
||||||
const auto deferredFrameTransform = addJob<GenerateDeferredFrameTransform>("DeferredFrameTransform");
|
const auto deferredFrameTransform = addJob<GenerateDeferredFrameTransform>("DeferredFrameTransform");
|
||||||
|
@ -202,8 +171,8 @@ RenderDeferredTask::RenderDeferredTask(CullFunctor cullFunctor) {
|
||||||
|
|
||||||
// Scene Octree Debuging job
|
// Scene Octree Debuging job
|
||||||
{
|
{
|
||||||
addJob<DrawSceneOctree>("DrawSceneOctree", spatialSelection);
|
// addJob<DrawSceneOctree>("DrawSceneOctree", spatialSelection);
|
||||||
addJob<DrawItemSelection>("DrawItemSelection", spatialSelection);
|
// addJob<DrawItemSelection>("DrawItemSelection", spatialSelection);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status icon rendering job
|
// Status icon rendering job
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#define hifi_RenderDeferredTask_h
|
#define hifi_RenderDeferredTask_h
|
||||||
|
|
||||||
#include <gpu/Pipeline.h>
|
#include <gpu/Pipeline.h>
|
||||||
#include <render/CullTask.h>
|
#include <render/RenderFetchSortCullTask.h>
|
||||||
#include "LightingModel.h"
|
#include "LightingModel.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,19 +192,11 @@ public:
|
||||||
void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext, const gpu::FramebufferPointer& srcFramebuffer);
|
void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext, const gpu::FramebufferPointer& srcFramebuffer);
|
||||||
};
|
};
|
||||||
|
|
||||||
using RenderDeferredTaskConfig = render::GPUTaskConfig;
|
|
||||||
|
|
||||||
class RenderDeferredTask : public render::Task {
|
class RenderDeferredTask : public render::Task {
|
||||||
public:
|
public:
|
||||||
using Config = RenderDeferredTaskConfig;
|
using JobModel = Model<RenderDeferredTask>;
|
||||||
RenderDeferredTask(render::CullFunctor cullFunctor);
|
|
||||||
|
|
||||||
void configure(const Config& config) {}
|
RenderDeferredTask(RenderFetchSortCullTask::Output items);
|
||||||
|
|
||||||
using JobModel = Model<RenderDeferredTask, Config>;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
gpu::RangeTimerPointer _gpuTimer;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_RenderDeferredTask_h
|
#endif // hifi_RenderDeferredTask_h
|
||||||
|
|
|
@ -19,9 +19,6 @@
|
||||||
#include <ViewFrustum.h>
|
#include <ViewFrustum.h>
|
||||||
#include <gpu/Context.h>
|
#include <gpu/Context.h>
|
||||||
|
|
||||||
#include <render/CullTask.h>
|
|
||||||
#include <render/SortTask.h>
|
|
||||||
|
|
||||||
#include "FramebufferCache.h"
|
#include "FramebufferCache.h"
|
||||||
#include "TextureCache.h"
|
#include "TextureCache.h"
|
||||||
|
|
||||||
|
@ -34,49 +31,18 @@ using namespace render;
|
||||||
extern void initOverlay3DPipelines(render::ShapePlumber& plumber);
|
extern void initOverlay3DPipelines(render::ShapePlumber& plumber);
|
||||||
extern void initDeferredPipelines(render::ShapePlumber& plumber);
|
extern void initDeferredPipelines(render::ShapePlumber& plumber);
|
||||||
|
|
||||||
RenderForwardTask::RenderForwardTask(CullFunctor cullFunctor) {
|
RenderForwardTask::RenderForwardTask(RenderFetchSortCullTask::Output items) {
|
||||||
// Prepare the ShapePipelines
|
// Prepare the ShapePipelines
|
||||||
ShapePlumberPointer shapePlumber = std::make_shared<ShapePlumber>();
|
ShapePlumberPointer shapePlumber = std::make_shared<ShapePlumber>();
|
||||||
initDeferredPipelines(*shapePlumber);
|
initDeferredPipelines(*shapePlumber);
|
||||||
|
|
||||||
// CPU jobs:
|
// Extract opaques / transparents / lights / overlays
|
||||||
// Fetch and cull the items from the scene
|
const auto opaques = items[0];
|
||||||
const auto spatialSelection = addJob<FetchSpatialTree>("FetchSceneSelection");
|
const auto transparents = items[1];
|
||||||
|
const auto lights = items[2];
|
||||||
cullFunctor = cullFunctor ? cullFunctor : [](const RenderArgs*, const AABox&){ return true; };
|
const auto overlayOpaques = items[3];
|
||||||
auto spatialFilter = ItemFilter::Builder::visibleWorldItems().withoutLayered();
|
const auto overlayTransparents = items[4];
|
||||||
const auto culledSpatialSelection = addJob<CullSpatialSelection>("CullSceneSelection", spatialSelection, cullFunctor, RenderDetails::ITEM, spatialFilter);
|
const auto background = items[5];
|
||||||
|
|
||||||
// Overlays are not culled
|
|
||||||
const auto nonspatialSelection = addJob<FetchNonspatialItems>("FetchOverlaySelection");
|
|
||||||
|
|
||||||
// Multi filter visible items into different buckets
|
|
||||||
const int NUM_FILTERS = 3;
|
|
||||||
const int OPAQUE_SHAPE_BUCKET = 0;
|
|
||||||
const int TRANSPARENT_SHAPE_BUCKET = 1;
|
|
||||||
const int LIGHT_BUCKET = 2;
|
|
||||||
const int BACKGROUND_BUCKET = 2;
|
|
||||||
MultiFilterItem<NUM_FILTERS>::ItemFilterArray spatialFilters = { {
|
|
||||||
ItemFilter::Builder::opaqueShape(),
|
|
||||||
ItemFilter::Builder::transparentShape(),
|
|
||||||
ItemFilter::Builder::light()
|
|
||||||
} };
|
|
||||||
MultiFilterItem<NUM_FILTERS>::ItemFilterArray nonspatialFilters = { {
|
|
||||||
ItemFilter::Builder::opaqueShape(),
|
|
||||||
ItemFilter::Builder::transparentShape(),
|
|
||||||
ItemFilter::Builder::background()
|
|
||||||
} };
|
|
||||||
const auto filteredSpatialBuckets = addJob<MultiFilterItem<NUM_FILTERS>>("FilterSceneSelection", culledSpatialSelection, spatialFilters).get<MultiFilterItem<NUM_FILTERS>::ItemBoundsArray>();
|
|
||||||
const auto filteredNonspatialBuckets = addJob<MultiFilterItem<NUM_FILTERS>>("FilterOverlaySelection", nonspatialSelection, nonspatialFilters).get<MultiFilterItem<NUM_FILTERS>::ItemBoundsArray>();
|
|
||||||
|
|
||||||
// Extract / Sort opaques / Transparents / Lights / Overlays
|
|
||||||
const auto opaques = addJob<DepthSortItems>("DepthSortOpaque", filteredSpatialBuckets[OPAQUE_SHAPE_BUCKET]);
|
|
||||||
const auto transparents = addJob<DepthSortItems>("DepthSortTransparent", filteredSpatialBuckets[TRANSPARENT_SHAPE_BUCKET], DepthSortItems(false));
|
|
||||||
const auto lights = filteredSpatialBuckets[LIGHT_BUCKET];
|
|
||||||
|
|
||||||
const auto overlayOpaques = addJob<DepthSortItems>("DepthSortOverlayOpaque", filteredNonspatialBuckets[OPAQUE_SHAPE_BUCKET]);
|
|
||||||
const auto overlayTransparents = addJob<DepthSortItems>("DepthSortOverlayTransparent", filteredNonspatialBuckets[TRANSPARENT_SHAPE_BUCKET], DepthSortItems(false));
|
|
||||||
const auto background = filteredNonspatialBuckets[BACKGROUND_BUCKET];
|
|
||||||
|
|
||||||
const auto framebuffer = addJob<PrepareFramebuffer>("PrepareFramebuffer");
|
const auto framebuffer = addJob<PrepareFramebuffer>("PrepareFramebuffer");
|
||||||
|
|
||||||
|
|
|
@ -13,19 +13,14 @@
|
||||||
#define hifi_RenderForwardTask_h
|
#define hifi_RenderForwardTask_h
|
||||||
|
|
||||||
#include <gpu/Pipeline.h>
|
#include <gpu/Pipeline.h>
|
||||||
#include <render/CullTask.h>
|
#include <render/RenderFetchSortCullTask.h>
|
||||||
#include "LightingModel.h"
|
#include "LightingModel.h"
|
||||||
|
|
||||||
using RenderForwardTaskConfig = render::GPUTaskConfig;
|
|
||||||
|
|
||||||
class RenderForwardTask : public render::Task {
|
class RenderForwardTask : public render::Task {
|
||||||
public:
|
public:
|
||||||
using Config = RenderForwardTaskConfig;
|
using JobModel = Model<RenderForwardTask>;
|
||||||
RenderForwardTask(render::CullFunctor cullFunctor);
|
|
||||||
|
|
||||||
void configure(const Config& config) {}
|
RenderForwardTask(RenderFetchSortCullTask::Output items);
|
||||||
|
|
||||||
using JobModel = Model<RenderForwardTask, Config>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PrepareFramebuffer {
|
class PrepareFramebuffer {
|
||||||
|
|
60
libraries/render/src/render/RenderFetchSortCullTask.cpp
Normal file
60
libraries/render/src/render/RenderFetchSortCullTask.cpp
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
//
|
||||||
|
// RenderFetchSortCullTask.cpp
|
||||||
|
// render/src/
|
||||||
|
//
|
||||||
|
// Created by Zach Pomerantz on 12/22/2016.
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
#include "RenderFetchSortCullTask.h"
|
||||||
|
|
||||||
|
#include "CullTask.h"
|
||||||
|
#include "SortTask.h"
|
||||||
|
|
||||||
|
using namespace render;
|
||||||
|
|
||||||
|
RenderFetchSortCullTask::RenderFetchSortCullTask(CullFunctor cullFunctor) {
|
||||||
|
cullFunctor = cullFunctor ? cullFunctor : [](const RenderArgs*, const AABox&){ return true; };
|
||||||
|
|
||||||
|
// CPU jobs:
|
||||||
|
// Fetch and cull the items from the scene
|
||||||
|
auto spatialFilter = ItemFilter::Builder::visibleWorldItems().withoutLayered();
|
||||||
|
const auto spatialSelection = addJob<FetchSpatialTree>("FetchSceneSelection", spatialFilter);
|
||||||
|
const auto culledSpatialSelection = addJob<CullSpatialSelection>("CullSceneSelection", spatialSelection, cullFunctor, RenderDetails::ITEM, spatialFilter);
|
||||||
|
|
||||||
|
// Overlays are not culled
|
||||||
|
const auto nonspatialSelection = addJob<FetchNonspatialItems>("FetchOverlaySelection");
|
||||||
|
|
||||||
|
// Multi filter visible items into different buckets
|
||||||
|
const int NUM_FILTERS = 3;
|
||||||
|
const int OPAQUE_SHAPE_BUCKET = 0;
|
||||||
|
const int TRANSPARENT_SHAPE_BUCKET = 1;
|
||||||
|
const int LIGHT_BUCKET = 2;
|
||||||
|
const int BACKGROUND_BUCKET = 2;
|
||||||
|
MultiFilterItem<NUM_FILTERS>::ItemFilterArray spatialFilters = { {
|
||||||
|
ItemFilter::Builder::opaqueShape(),
|
||||||
|
ItemFilter::Builder::transparentShape(),
|
||||||
|
ItemFilter::Builder::light()
|
||||||
|
} };
|
||||||
|
MultiFilterItem<NUM_FILTERS>::ItemFilterArray nonspatialFilters = { {
|
||||||
|
ItemFilter::Builder::opaqueShape(),
|
||||||
|
ItemFilter::Builder::transparentShape(),
|
||||||
|
ItemFilter::Builder::background()
|
||||||
|
} };
|
||||||
|
const auto filteredSpatialBuckets = addJob<MultiFilterItem<NUM_FILTERS>>("FilterSceneSelection", culledSpatialSelection, spatialFilters).get<MultiFilterItem<NUM_FILTERS>::ItemBoundsArray>();
|
||||||
|
const auto filteredNonspatialBuckets = addJob<MultiFilterItem<NUM_FILTERS>>("FilterOverlaySelection", nonspatialSelection, nonspatialFilters).get<MultiFilterItem<NUM_FILTERS>::ItemBoundsArray>();
|
||||||
|
|
||||||
|
// Extract opaques / transparents / lights / overlays
|
||||||
|
const auto opaques = addJob<DepthSortItems>("DepthSortOpaque", filteredSpatialBuckets[OPAQUE_SHAPE_BUCKET]);
|
||||||
|
const auto transparents = addJob<DepthSortItems>("DepthSortTransparent", filteredSpatialBuckets[TRANSPARENT_SHAPE_BUCKET], DepthSortItems(false));
|
||||||
|
const auto lights = filteredSpatialBuckets[LIGHT_BUCKET];
|
||||||
|
|
||||||
|
const auto overlayOpaques = addJob<DepthSortItems>("DepthSortOverlayOpaque", filteredNonspatialBuckets[OPAQUE_SHAPE_BUCKET]);
|
||||||
|
const auto overlayTransparents = addJob<DepthSortItems>("DepthSortOverlayTransparent", filteredNonspatialBuckets[TRANSPARENT_SHAPE_BUCKET], DepthSortItems(false));
|
||||||
|
const auto background = filteredNonspatialBuckets[BACKGROUND_BUCKET];
|
||||||
|
|
||||||
|
setOutput(Output{{ opaques, transparents, lights, overlayOpaques, overlayTransparents, background }});
|
||||||
|
}
|
28
libraries/render/src/render/RenderFetchSortCullTask.h
Normal file
28
libraries/render/src/render/RenderFetchSortCullTask.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
//
|
||||||
|
// RenderFetchSortCullTask.h
|
||||||
|
// render/src/
|
||||||
|
//
|
||||||
|
// Created by Zach Pomerantz on 12/22/2016.
|
||||||
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef hifi_RenderFetchSortCullTask_h
|
||||||
|
#define hifi_RenderFetchSortCullTask_h
|
||||||
|
|
||||||
|
#include <gpu/Pipeline.h>
|
||||||
|
|
||||||
|
#include "Task.h"
|
||||||
|
#include "CullTask.h"
|
||||||
|
|
||||||
|
class RenderFetchSortCullTask : public render::Task {
|
||||||
|
public:
|
||||||
|
using Output = std::array<render::Varying, 6>;
|
||||||
|
using JobModel = ModelO<RenderFetchSortCullTask>;
|
||||||
|
|
||||||
|
RenderFetchSortCullTask(render::CullFunctor cullFunctor);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // hifi_RenderFetchSortCullTask_h
|
|
@ -14,6 +14,8 @@
|
||||||
#include <gl/Config.h>
|
#include <gl/Config.h>
|
||||||
#include <gl/Context.h>
|
#include <gl/Context.h>
|
||||||
|
|
||||||
|
#include <QProcessEnvironment>
|
||||||
|
|
||||||
#include <QtCore/QDir>
|
#include <QtCore/QDir>
|
||||||
#include <QtCore/QElapsedTimer>
|
#include <QtCore/QElapsedTimer>
|
||||||
#include <QtCore/QLoggingCategory>
|
#include <QtCore/QLoggingCategory>
|
||||||
|
@ -23,7 +25,6 @@
|
||||||
#include <QtCore/QThread>
|
#include <QtCore/QThread>
|
||||||
#include <QtCore/QThreadPool>
|
#include <QtCore/QThreadPool>
|
||||||
|
|
||||||
|
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <QtGui/QResizeEvent>
|
#include <QtGui/QResizeEvent>
|
||||||
#include <QtGui/QWindow>
|
#include <QtGui/QWindow>
|
||||||
|
@ -33,7 +34,6 @@
|
||||||
#include <QtWidgets/QMessageBox>
|
#include <QtWidgets/QMessageBox>
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
|
|
||||||
|
|
||||||
#include <shared/RateCounter.h>
|
#include <shared/RateCounter.h>
|
||||||
#include <shared/NetworkUtils.h>
|
#include <shared/NetworkUtils.h>
|
||||||
#include <shared/FileLogger.h>
|
#include <shared/FileLogger.h>
|
||||||
|
@ -59,8 +59,10 @@
|
||||||
#include <model-networking/ModelCache.h>
|
#include <model-networking/ModelCache.h>
|
||||||
#include <GeometryCache.h>
|
#include <GeometryCache.h>
|
||||||
#include <DeferredLightingEffect.h>
|
#include <DeferredLightingEffect.h>
|
||||||
|
#include <render/RenderFetchSortCullTask.h>
|
||||||
#include <RenderShadowTask.h>
|
#include <RenderShadowTask.h>
|
||||||
#include <RenderDeferredTask.h>
|
#include <RenderDeferredTask.h>
|
||||||
|
#include <RenderForwardTask.h>
|
||||||
#include <OctreeConstants.h>
|
#include <OctreeConstants.h>
|
||||||
|
|
||||||
#include <EntityTreeRenderer.h>
|
#include <EntityTreeRenderer.h>
|
||||||
|
@ -534,7 +536,14 @@ public:
|
||||||
_initContext.makeCurrent();
|
_initContext.makeCurrent();
|
||||||
// Render engine init
|
// Render engine init
|
||||||
_renderEngine->addJob<RenderShadowTask>("RenderShadowTask", _cullFunctor);
|
_renderEngine->addJob<RenderShadowTask>("RenderShadowTask", _cullFunctor);
|
||||||
_renderEngine->addJob<RenderDeferredTask>("RenderDeferredTask", _cullFunctor);
|
const auto items = _renderEngine->addJob<RenderFetchSortCullTask>("FetchSortCull", _cullFunctor);
|
||||||
|
assert(items.canCast<RenderFetchSortCullTask::Output>());
|
||||||
|
static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
|
||||||
|
if (QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD)) {
|
||||||
|
_renderEngine->addJob<RenderForwardTask>("RenderForwardTask", items.get<RenderFetchSortCullTask::Output>());
|
||||||
|
} else {
|
||||||
|
_renderEngine->addJob<RenderDeferredTask>("RenderDeferredTask", items.get<RenderFetchSortCullTask::Output>());
|
||||||
|
}
|
||||||
_renderEngine->load();
|
_renderEngine->load();
|
||||||
_renderEngine->registerScene(_main3DScene);
|
_renderEngine->registerScene(_main3DScene);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue