Rebel Fork Framework
Urho3D::PipelineStateTracker Class Referenceabstract

Helper class to track pipeline state changes caused by derived class. More...

#include <Urho3D/Graphics/PipelineStateTracker.h>

Inheritance diagram for Urho3D::PipelineStateTracker:
Urho3D::Drawable Urho3D::Geometry Urho3D::IndexBuffer Urho3D::Material Urho3D::Pass Urho3D::VertexBuffer Urho3D::BillboardSet Urho3D::CustomGeometry Urho3D::DecalSet Urho3D::Drawable2D Urho3D::Light Urho3D::Renderer2D Urho3D::RibbonTrail Urho3D::StaticModel Urho3D::StaticModelForLightmap Urho3D::TerrainPatch Urho3D::Text3D Urho3D::Zone

Public Member Functions

virtual ~PipelineStateTracker ()
 Destruct.
 
unsigned GetPipelineStateHash () const
 Return (partial) pipeline state hash. Save to call from multiple threads as long as the object is not changing.
 
void MarkPipelineStateHashDirty ()
 Mark pipeline state hash as dirty.
 

Protected Member Functions

PipelineStateSubscription CreateDependency (PipelineStateTracker *dependency)
 Create dependency onto another pipeline state.
 
void AddSubscriberReference (PipelineStateTracker *subscriber)
 Add reference to subscriber pipeline state tracker.
 
void RemoveSubscriberReference (PipelineStateTracker *subscriber)
 Remove reference to subscriber pipeline state tracker.
 

Private Types

using DependantVector = ea::vector< ea::pair< PipelineStateTracker *, unsigned > >
 Vector of subscribers with reference counters.
 

Private Member Functions

virtual unsigned RecalculatePipelineStateHash () const =0
 Recalculate hash (must not be non zero). Shall be save to call from multiple threads as long as the object is not changing.
 
DependantVector::iterator FindSubscriberIter (PipelineStateTracker *subscriber)
 Find subscriber iterator by pointer.
 

Private Attributes

std::atomic_uint32_t pipelineStateHash_
 Cached hash.
 
DependantVector subscribers_
 Other pipeline state trackers depending on this tracker.
 

Friends

class PipelineStateSubscription
 

Detailed Description

Helper class to track pipeline state changes caused by derived class.


The documentation for this class was generated from the following files: