mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Double renderbins for renderables (#2520)
This commit is contained in:
@@ -82,8 +82,9 @@ public:
|
||||
|
||||
std::string_view typeAsString() const;
|
||||
|
||||
virtual void render(const RenderData& data, RendererTasks& rendererTask);
|
||||
virtual void update(const UpdateData& data);
|
||||
virtual void render(const RenderData& data, RendererTasks& rendererTask);
|
||||
virtual void renderSecondary(const RenderData& data, RendererTasks& rendererTask);
|
||||
|
||||
// The 'surface' in this case is the interaction sphere of this renderable. In some
|
||||
// cases (i.e., planets) this corresponds directly to the physical surface, but in
|
||||
@@ -97,7 +98,9 @@ public:
|
||||
|
||||
RenderBin renderBin() const;
|
||||
void setRenderBin(RenderBin bin);
|
||||
bool matchesRenderBinMask(int binMask);
|
||||
bool matchesRenderBinMask(int binMask) const noexcept;
|
||||
|
||||
bool matchesSecondaryRenderBin(int binMask) const noexcept;
|
||||
|
||||
void setFade(float fade);
|
||||
|
||||
@@ -129,6 +132,10 @@ protected:
|
||||
bool _shouldUpdateIfDisabled = false;
|
||||
RenderBin _renderBin = RenderBin::Opaque;
|
||||
|
||||
// An optional renderbin that renderables can use for certain components, in cases
|
||||
// where all parts of the renderable should not be rendered in the same bin
|
||||
std::optional<RenderBin> _secondaryRenderBin;
|
||||
|
||||
private:
|
||||
// We only want the SceneGraphNode to be able manipulate the parent, so we don't want
|
||||
// to provide a set method for this. Otherwise, anyone might mess around with our
|
||||
|
||||
Reference in New Issue
Block a user