mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 00:10:00 +02:00
Merge pull request #6860 from zzmp/refactor/cull-functor
Refactor ShouldRenderFunctor to be out of RenderArgs Tested on windows, checking the values returned by the culling/visible/too small Looks good
This commit is contained in:
commit
0da4df93b8
8 changed files with 60 additions and 53 deletions
|
@ -672,7 +672,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
initializeGL();
|
initializeGL();
|
||||||
|
|
||||||
// Start rendering
|
// Start rendering
|
||||||
_renderEngine->addTask(make_shared<RenderDeferredTask>());
|
_renderEngine->addTask(make_shared<RenderDeferredTask>(LODManager::shouldRender));
|
||||||
_renderEngine->registerScene(_main3DScene);
|
_renderEngine->registerScene(_main3DScene);
|
||||||
|
|
||||||
_offscreenContext->makeCurrent();
|
_offscreenContext->makeCurrent();
|
||||||
|
@ -3826,7 +3826,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se
|
||||||
auto renderInterface = DependencyManager::get<RenderScriptingInterface>();
|
auto renderInterface = DependencyManager::get<RenderScriptingInterface>();
|
||||||
auto renderContext = renderInterface->getRenderContext();
|
auto renderContext = renderInterface->getRenderContext();
|
||||||
|
|
||||||
renderArgs->_shouldRender = LODManager::shouldRender;
|
|
||||||
renderArgs->_viewFrustum = getDisplayViewFrustum();
|
renderArgs->_viewFrustum = getDisplayViewFrustum();
|
||||||
renderContext.setArgs(renderArgs);
|
renderContext.setArgs(renderArgs);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,9 @@ void ToneMappingDeferred::run(const SceneContextPointer& sceneContext, const Ren
|
||||||
_toneMappingEffect.render(renderContext->getArgs());
|
_toneMappingEffect.render(renderContext->getArgs());
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderDeferredTask::RenderDeferredTask() : Task() {
|
RenderDeferredTask::RenderDeferredTask(CullFunctor cullFunctor) : Task() {
|
||||||
|
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);
|
||||||
|
@ -81,7 +83,7 @@ RenderDeferredTask::RenderDeferredTask() : Task() {
|
||||||
auto fetchedOpaques = addJob<FetchItems>("FetchOpaque", FetchItems([](const RenderContextPointer& context, int count) {
|
auto fetchedOpaques = addJob<FetchItems>("FetchOpaque", FetchItems([](const RenderContextPointer& context, int count) {
|
||||||
context->getItemsConfig().opaque.numFeed = count;
|
context->getItemsConfig().opaque.numFeed = count;
|
||||||
}));
|
}));
|
||||||
auto culledOpaques = addJob<CullItems<RenderDetails::OPAQUE_ITEM>>("CullOpaque", fetchedOpaques);
|
auto culledOpaques = addJob<CullItems<RenderDetails::OPAQUE_ITEM>>("CullOpaque", fetchedOpaques, cullFunctor);
|
||||||
auto opaques = addJob<DepthSortItems>("DepthSortOpaque", culledOpaques);
|
auto opaques = addJob<DepthSortItems>("DepthSortOpaque", culledOpaques);
|
||||||
|
|
||||||
// CPU only, create the list of renderedTransparents items
|
// CPU only, create the list of renderedTransparents items
|
||||||
|
@ -91,7 +93,7 @@ RenderDeferredTask::RenderDeferredTask() : Task() {
|
||||||
context->getItemsConfig().transparent.numFeed = count;
|
context->getItemsConfig().transparent.numFeed = count;
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
auto culledTransparents = addJob<CullItems<RenderDetails::TRANSLUCENT_ITEM>>("CullTransparent", fetchedTransparents);
|
auto culledTransparents = addJob<CullItems<RenderDetails::TRANSLUCENT_ITEM>>("CullTransparent", fetchedTransparents, cullFunctor);
|
||||||
auto transparents = addJob<DepthSortItems>("DepthSortTransparent", culledTransparents, DepthSortItems(false));
|
auto transparents = addJob<DepthSortItems>("DepthSortTransparent", culledTransparents, DepthSortItems(false));
|
||||||
|
|
||||||
// GPU Jobs: Start preparing the deferred and lighting buffer
|
// GPU Jobs: Start preparing the deferred and lighting buffer
|
||||||
|
@ -107,7 +109,7 @@ RenderDeferredTask::RenderDeferredTask() : Task() {
|
||||||
addJob<DrawBackgroundDeferred>("DrawBackgroundDeferred");
|
addJob<DrawBackgroundDeferred>("DrawBackgroundDeferred");
|
||||||
|
|
||||||
// Draw Lights just add the lights to the current list of lights to deal with. NOt really gpu job for now.
|
// Draw Lights just add the lights to the current list of lights to deal with. NOt really gpu job for now.
|
||||||
addJob<DrawLight>("DrawLight");
|
addJob<DrawLight>("DrawLight", cullFunctor);
|
||||||
|
|
||||||
// DeferredBuffer is complete, now let's shade it into the LightingBuffer
|
// DeferredBuffer is complete, now let's shade it into the LightingBuffer
|
||||||
addJob<RenderDeferred>("RenderDeferred");
|
addJob<RenderDeferred>("RenderDeferred");
|
||||||
|
@ -174,6 +176,7 @@ void RenderDeferredTask::run(const SceneContextPointer& sceneContext, const Rend
|
||||||
setAntialiasingStatus(renderContext->getFxaaStatus());
|
setAntialiasingStatus(renderContext->getFxaaStatus());
|
||||||
setToneMappingExposure(renderContext->getTone().exposure);
|
setToneMappingExposure(renderContext->getTone().exposure);
|
||||||
setToneMappingToneCurve(renderContext->getTone().toneCurve);
|
setToneMappingToneCurve(renderContext->getTone().toneCurve);
|
||||||
|
// TODO: Allow runtime manipulation of culling ShouldRenderFunctor
|
||||||
|
|
||||||
for (auto job : _jobs) {
|
for (auto job : _jobs) {
|
||||||
job.run(sceneContext, renderContext);
|
job.run(sceneContext, renderContext);
|
||||||
|
|
|
@ -12,10 +12,10 @@
|
||||||
#ifndef hifi_RenderDeferredTask_h
|
#ifndef hifi_RenderDeferredTask_h
|
||||||
#define hifi_RenderDeferredTask_h
|
#define hifi_RenderDeferredTask_h
|
||||||
|
|
||||||
#include "render/Engine.h"
|
|
||||||
|
|
||||||
#include "gpu/Pipeline.h"
|
#include "gpu/Pipeline.h"
|
||||||
|
|
||||||
|
#include "render/DrawTask.h"
|
||||||
|
|
||||||
#include "ToneMappingEffect.h"
|
#include "ToneMappingEffect.h"
|
||||||
|
|
||||||
class SetupDeferred {
|
class SetupDeferred {
|
||||||
|
@ -113,15 +113,8 @@ public:
|
||||||
|
|
||||||
class RenderDeferredTask : public render::Task {
|
class RenderDeferredTask : public render::Task {
|
||||||
public:
|
public:
|
||||||
RenderDeferredTask();
|
RenderDeferredTask(render::CullFunctor cullFunctor);
|
||||||
|
|
||||||
int _drawDebugDeferredBufferIndex;
|
|
||||||
int _drawStatusJobIndex;
|
|
||||||
int _drawHitEffectJobIndex;
|
|
||||||
int _occlusionJobIndex;
|
|
||||||
int _antialiasingJobIndex;
|
|
||||||
int _toneMappingJobIndex;
|
|
||||||
|
|
||||||
void setDrawDebugDeferredBuffer(int draw) { enableJob(_drawDebugDeferredBufferIndex, draw >= 0); }
|
void setDrawDebugDeferredBuffer(int draw) { enableJob(_drawDebugDeferredBufferIndex, draw >= 0); }
|
||||||
bool doDrawDebugDeferredBuffer() const { return getEnableJob(_drawDebugDeferredBufferIndex); }
|
bool doDrawDebugDeferredBuffer() const { return getEnableJob(_drawDebugDeferredBufferIndex); }
|
||||||
|
|
||||||
|
@ -147,6 +140,14 @@ public:
|
||||||
int getToneMappingToneCurve() const;
|
int getToneMappingToneCurve() const;
|
||||||
|
|
||||||
virtual void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext);
|
virtual void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int _drawDebugDeferredBufferIndex;
|
||||||
|
int _drawStatusJobIndex;
|
||||||
|
int _drawHitEffectJobIndex;
|
||||||
|
int _occlusionJobIndex;
|
||||||
|
int _antialiasingJobIndex;
|
||||||
|
int _toneMappingJobIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_RenderDeferredTask_h
|
#endif // hifi_RenderDeferredTask_h
|
||||||
|
|
|
@ -77,7 +77,9 @@ void RenderShadowMap::run(const render::SceneContextPointer& sceneContext, const
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderShadowTask::RenderShadowTask() : Task() {
|
RenderShadowTask::RenderShadowTask(CullFunctor cullFunctor) : Task() {
|
||||||
|
cullFunctor = cullFunctor ? cullFunctor : [](const RenderArgs*, const AABox&){ return true; };
|
||||||
|
|
||||||
// Prepare the ShapePipeline
|
// Prepare the ShapePipeline
|
||||||
ShapePlumberPointer shapePlumber = std::make_shared<ShapePlumber>();
|
ShapePlumberPointer shapePlumber = std::make_shared<ShapePlumber>();
|
||||||
{
|
{
|
||||||
|
@ -104,7 +106,7 @@ RenderShadowTask::RenderShadowTask() : Task() {
|
||||||
auto fetchedItems = addJob<FetchItems>("FetchShadowMap");
|
auto fetchedItems = addJob<FetchItems>("FetchShadowMap");
|
||||||
|
|
||||||
// CPU: Cull against KeyLight frustum (nearby viewing camera)
|
// CPU: Cull against KeyLight frustum (nearby viewing camera)
|
||||||
auto culledItems = addJob<CullItems<RenderDetails::SHADOW_ITEM>>("CullShadowMap", fetchedItems);
|
auto culledItems = addJob<CullItems<RenderDetails::SHADOW_ITEM>>("CullShadowMap", fetchedItems, cullFunctor);
|
||||||
|
|
||||||
// CPU: Sort by pipeline
|
// CPU: Sort by pipeline
|
||||||
auto sortedShapes = addJob<PipelineSortShapes>("PipelineSortShadowSort", culledItems);
|
auto sortedShapes = addJob<PipelineSortShapes>("PipelineSortShadowSort", culledItems);
|
||||||
|
@ -142,6 +144,7 @@ void RenderShadowTask::run(const SceneContextPointer& sceneContext, const Render
|
||||||
|
|
||||||
// Set the keylight frustum
|
// Set the keylight frustum
|
||||||
args->_viewFrustum = globalLight->shadow.getFrustum().get();
|
args->_viewFrustum = globalLight->shadow.getFrustum().get();
|
||||||
|
// TODO: Allow runtime manipulation of culling ShouldRenderFunctor
|
||||||
|
|
||||||
for (auto job : _jobs) {
|
for (auto job : _jobs) {
|
||||||
job.run(sceneContext, renderContext);
|
job.run(sceneContext, renderContext);
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include <gpu/Framebuffer.h>
|
#include <gpu/Framebuffer.h>
|
||||||
#include <gpu/Pipeline.h>
|
#include <gpu/Pipeline.h>
|
||||||
|
|
||||||
#include <render/Scene.h>
|
|
||||||
#include <render/DrawTask.h>
|
#include <render/DrawTask.h>
|
||||||
|
|
||||||
class ViewFrustum;
|
class ViewFrustum;
|
||||||
|
@ -33,7 +32,7 @@ protected:
|
||||||
|
|
||||||
class RenderShadowTask : public render::Task {
|
class RenderShadowTask : public render::Task {
|
||||||
public:
|
public:
|
||||||
RenderShadowTask();
|
RenderShadowTask(render::CullFunctor shouldRender);
|
||||||
|
|
||||||
void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext);
|
void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext);
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,14 +20,15 @@
|
||||||
|
|
||||||
using namespace render;
|
using namespace render;
|
||||||
|
|
||||||
void render::cullItems(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ItemIDsBounds& inItems, ItemIDsBounds& outItems) {
|
void render::cullItems(const RenderContextPointer& renderContext, const CullFunctor& cullFunctor, RenderDetails::Item& details,
|
||||||
|
const ItemIDsBounds& inItems, ItemIDsBounds& outItems) {
|
||||||
assert(renderContext->getArgs());
|
assert(renderContext->getArgs());
|
||||||
assert(renderContext->getArgs()->_viewFrustum);
|
assert(renderContext->getArgs()->_viewFrustum);
|
||||||
|
|
||||||
RenderArgs* args = renderContext->getArgs();
|
RenderArgs* args = renderContext->getArgs();
|
||||||
auto renderDetails = renderContext->getArgs()->_details._item;
|
ViewFrustum* frustum = args->_viewFrustum;
|
||||||
|
|
||||||
renderDetails->_considered += inItems.size();
|
details._considered += inItems.size();
|
||||||
|
|
||||||
// Culling / LOD
|
// Culling / LOD
|
||||||
for (auto item : inItems) {
|
for (auto item : inItems) {
|
||||||
|
@ -41,24 +42,24 @@ void render::cullItems(const SceneContextPointer& sceneContext, const RenderCont
|
||||||
bool outOfView;
|
bool outOfView;
|
||||||
{
|
{
|
||||||
PerformanceTimer perfTimer("boxInFrustum");
|
PerformanceTimer perfTimer("boxInFrustum");
|
||||||
outOfView = args->_viewFrustum->boxInFrustum(item.bounds) == ViewFrustum::OUTSIDE;
|
outOfView = frustum->boxInFrustum(item.bounds) == ViewFrustum::OUTSIDE;
|
||||||
}
|
}
|
||||||
if (!outOfView) {
|
if (!outOfView) {
|
||||||
bool bigEnoughToRender;
|
bool bigEnoughToRender;
|
||||||
{
|
{
|
||||||
PerformanceTimer perfTimer("shouldRender");
|
PerformanceTimer perfTimer("shouldRender");
|
||||||
bigEnoughToRender = (args->_shouldRender) ? args->_shouldRender(args, item.bounds) : true;
|
bigEnoughToRender = cullFunctor(args, item.bounds);
|
||||||
}
|
}
|
||||||
if (bigEnoughToRender) {
|
if (bigEnoughToRender) {
|
||||||
outItems.emplace_back(item); // One more Item to render
|
outItems.emplace_back(item); // One more Item to render
|
||||||
} else {
|
} else {
|
||||||
renderDetails->_tooSmall++;
|
details._tooSmall++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
renderDetails->_outOfView++;
|
details._outOfView++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
renderDetails->_rendered += outItems.size();
|
details._rendered += outItems.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ItemBound {
|
struct ItemBound {
|
||||||
|
@ -202,10 +203,10 @@ void DrawLight::run(const SceneContextPointer& sceneContext, const RenderContext
|
||||||
|
|
||||||
RenderArgs* args = renderContext->getArgs();
|
RenderArgs* args = renderContext->getArgs();
|
||||||
|
|
||||||
|
auto& details = args->_details.edit(RenderDetails::OTHER_ITEM);
|
||||||
ItemIDsBounds culledItems;
|
ItemIDsBounds culledItems;
|
||||||
culledItems.reserve(inItems.size());
|
culledItems.reserve(inItems.size());
|
||||||
args->_details.pointTo(RenderDetails::OTHER_ITEM);
|
cullItems(renderContext, _cullFunctor, details, inItems, culledItems);
|
||||||
cullItems(sceneContext, renderContext, inItems, culledItems);
|
|
||||||
|
|
||||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||||
args->_batch = &batch;
|
args->_batch = &batch;
|
||||||
|
|
|
@ -19,7 +19,10 @@
|
||||||
|
|
||||||
namespace render {
|
namespace render {
|
||||||
|
|
||||||
void cullItems(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ItemIDsBounds& inItems, ItemIDsBounds& outItems);
|
using CullFunctor = std::function<bool(const RenderArgs*, const AABox&)>;
|
||||||
|
|
||||||
|
void cullItems(const RenderContextPointer& renderContext, const CullFunctor& cullFunctor, RenderDetails::Item& details,
|
||||||
|
const ItemIDsBounds& inItems, ItemIDsBounds& outItems);
|
||||||
void depthSortItems(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, bool frontToBack, const ItemIDsBounds& inItems, ItemIDsBounds& outItems);
|
void depthSortItems(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, bool frontToBack, const ItemIDsBounds& inItems, ItemIDsBounds& outItems);
|
||||||
void renderItems(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ItemIDsBounds& inItems);
|
void renderItems(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ItemIDsBounds& inItems);
|
||||||
void renderShapes(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ShapePlumberPointer& shapeContext, const ItemIDsBounds& inItems, int maxDrawnItems = -1);
|
void renderShapes(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ShapePlumberPointer& shapeContext, const ItemIDsBounds& inItems, int maxDrawnItems = -1);
|
||||||
|
@ -41,14 +44,20 @@ public:
|
||||||
template<RenderDetails::Type T = RenderDetails::Type::OTHER_ITEM>
|
template<RenderDetails::Type T = RenderDetails::Type::OTHER_ITEM>
|
||||||
class CullItems {
|
class CullItems {
|
||||||
public:
|
public:
|
||||||
|
CullItems(CullFunctor cullFunctor) : _cullFunctor{ cullFunctor } {}
|
||||||
|
|
||||||
void run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ItemIDsBounds& inItems, ItemIDsBounds& outItems) {
|
void run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext, const ItemIDsBounds& inItems, ItemIDsBounds& outItems) {
|
||||||
|
const auto& args = renderContext->getArgs();
|
||||||
|
auto& details = args->_details.edit(T);
|
||||||
outItems.clear();
|
outItems.clear();
|
||||||
outItems.reserve(inItems.size());
|
outItems.reserve(inItems.size());
|
||||||
renderContext->getArgs()->_details.pointTo(T);
|
render::cullItems(renderContext, _cullFunctor, details, inItems, outItems);
|
||||||
render::cullItems(sceneContext, renderContext, inItems, outItems);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using JobModel = Task::Job::ModelIO<CullItems<T>, ItemIDsBounds, ItemIDsBounds>;
|
using JobModel = Task::Job::ModelIO<CullItems<T>, ItemIDsBounds, ItemIDsBounds>;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
CullFunctor _cullFunctor;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DepthSortItems {
|
class DepthSortItems {
|
||||||
|
@ -62,8 +71,12 @@ public:
|
||||||
|
|
||||||
class DrawLight {
|
class DrawLight {
|
||||||
public:
|
public:
|
||||||
|
DrawLight(CullFunctor cullFunctor) : _cullFunctor{ cullFunctor } {}
|
||||||
void run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext);
|
void run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext);
|
||||||
using JobModel = Task::Job::Model<DrawLight>;
|
using JobModel = Task::Job::Model<DrawLight>;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
CullFunctor _cullFunctor;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PipelineSortShapes {
|
class PipelineSortShapes {
|
||||||
|
|
|
@ -56,34 +56,25 @@ public:
|
||||||
Item _translucent;
|
Item _translucent;
|
||||||
Item _other;
|
Item _other;
|
||||||
|
|
||||||
Item* _item = &_other;
|
Item& edit(Type type) {
|
||||||
|
|
||||||
void pointTo(Type type) {
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case OPAQUE_ITEM:
|
case OPAQUE_ITEM:
|
||||||
_item = &_opaque;
|
return _opaque;
|
||||||
break;
|
|
||||||
case SHADOW_ITEM:
|
case SHADOW_ITEM:
|
||||||
_item = &_shadow;
|
return _shadow;
|
||||||
break;
|
|
||||||
case TRANSLUCENT_ITEM:
|
case TRANSLUCENT_ITEM:
|
||||||
_item = &_translucent;
|
return _translucent;
|
||||||
break;
|
|
||||||
case OTHER_ITEM:
|
case OTHER_ITEM:
|
||||||
_item = &_other;
|
default:
|
||||||
break;
|
return _other;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class RenderArgs {
|
class RenderArgs {
|
||||||
public:
|
public:
|
||||||
typedef std::function<bool(const RenderArgs* args, const AABox& bounds)> ShoudRenderFunctor;
|
|
||||||
|
|
||||||
enum RenderMode { DEFAULT_RENDER_MODE, SHADOW_RENDER_MODE, DIFFUSE_RENDER_MODE, NORMAL_RENDER_MODE, MIRROR_RENDER_MODE };
|
enum RenderMode { DEFAULT_RENDER_MODE, SHADOW_RENDER_MODE, DIFFUSE_RENDER_MODE, NORMAL_RENDER_MODE, MIRROR_RENDER_MODE };
|
||||||
|
|
||||||
enum RenderSide { MONO, STEREO_LEFT, STEREO_RIGHT };
|
enum RenderSide { MONO, STEREO_LEFT, STEREO_RIGHT };
|
||||||
|
|
||||||
enum DebugFlags {
|
enum DebugFlags {
|
||||||
RENDER_DEBUG_NONE = 0,
|
RENDER_DEBUG_NONE = 0,
|
||||||
RENDER_DEBUG_HULLS = 1
|
RENDER_DEBUG_HULLS = 1
|
||||||
|
@ -97,8 +88,7 @@ public:
|
||||||
RenderMode renderMode = DEFAULT_RENDER_MODE,
|
RenderMode renderMode = DEFAULT_RENDER_MODE,
|
||||||
RenderSide renderSide = MONO,
|
RenderSide renderSide = MONO,
|
||||||
DebugFlags debugFlags = RENDER_DEBUG_NONE,
|
DebugFlags debugFlags = RENDER_DEBUG_NONE,
|
||||||
gpu::Batch* batch = nullptr,
|
gpu::Batch* batch = nullptr) :
|
||||||
ShoudRenderFunctor shouldRender = nullptr) :
|
|
||||||
_context(context),
|
_context(context),
|
||||||
_renderer(renderer),
|
_renderer(renderer),
|
||||||
_viewFrustum(viewFrustum),
|
_viewFrustum(viewFrustum),
|
||||||
|
@ -107,8 +97,7 @@ public:
|
||||||
_renderMode(renderMode),
|
_renderMode(renderMode),
|
||||||
_renderSide(renderSide),
|
_renderSide(renderSide),
|
||||||
_debugFlags(debugFlags),
|
_debugFlags(debugFlags),
|
||||||
_batch(batch),
|
_batch(batch) {
|
||||||
_shouldRender(shouldRender) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<gpu::Context> _context = nullptr;
|
std::shared_ptr<gpu::Context> _context = nullptr;
|
||||||
|
@ -123,7 +112,6 @@ public:
|
||||||
RenderSide _renderSide = MONO;
|
RenderSide _renderSide = MONO;
|
||||||
DebugFlags _debugFlags = RENDER_DEBUG_NONE;
|
DebugFlags _debugFlags = RENDER_DEBUG_NONE;
|
||||||
gpu::Batch* _batch = nullptr;
|
gpu::Batch* _batch = nullptr;
|
||||||
ShoudRenderFunctor _shouldRender;
|
|
||||||
|
|
||||||
std::shared_ptr<gpu::Texture> _whiteTexture;
|
std::shared_ptr<gpu::Texture> _whiteTexture;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue