mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
Make Forward DrawBounds enableable
This commit is contained in:
parent
26cfc83e20
commit
e406e3d47e
2 changed files with 18 additions and 11 deletions
|
@ -33,11 +33,25 @@ private:
|
|||
gpu::FramebufferPointer _framebuffer;
|
||||
};
|
||||
|
||||
class DrawBounds {
|
||||
class DrawBackground {
|
||||
public:
|
||||
using Inputs = render::ItemBounds;
|
||||
using JobModel = render::Job::ModelI<DrawBounds, Inputs>;
|
||||
using JobModel = render::Job::ModelI<DrawBackground, Inputs>;
|
||||
|
||||
void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext, const Inputs& background);
|
||||
};
|
||||
|
||||
class DrawBounds {
|
||||
public:
|
||||
class Config : public render::JobConfig {
|
||||
public:
|
||||
Config() : JobConfig(false) {}
|
||||
};
|
||||
|
||||
using Inputs = render::ItemBounds;
|
||||
using JobModel = render::Job::ModelI<DrawBounds, Inputs, Config>;
|
||||
|
||||
void configure(const Config& configuration) {}
|
||||
void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext, const Inputs& items);
|
||||
|
||||
private:
|
||||
|
@ -47,12 +61,4 @@ private:
|
|||
int _scaleLocation { -1 };
|
||||
};
|
||||
|
||||
class DrawBackground {
|
||||
public:
|
||||
using Inputs = render::ItemBounds;
|
||||
using JobModel = render::Job::ModelI<DrawBackground, Inputs>;
|
||||
|
||||
void run(const render::SceneContextPointer& sceneContext, const render::RenderContextPointer& renderContext, const Inputs& background);
|
||||
};
|
||||
|
||||
#endif // hifi_RenderForwardTask_h
|
||||
|
|
|
@ -371,6 +371,7 @@ protected:
|
|||
class JobConfig : public QObject {
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(double cpuRunTime READ getCPURunTime NOTIFY newStats()) //ms
|
||||
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled)
|
||||
|
||||
double _msCPURunTime{ 0.0 };
|
||||
public:
|
||||
|
@ -380,7 +381,7 @@ public:
|
|||
JobConfig(bool enabled) : alwaysEnabled{ false }, enabled{ enabled } {}
|
||||
|
||||
bool isEnabled() { return alwaysEnabled || enabled; }
|
||||
void setEnabled(bool enable) { enabled = enable; }
|
||||
void setEnabled(bool enable) { enabled = alwaysEnabled || enable; }
|
||||
|
||||
bool alwaysEnabled{ true };
|
||||
bool enabled{ true };
|
||||
|
|
Loading…
Reference in a new issue