Rebel Fork Framework
|
Helper class to track pipeline state changes caused by derived class. More...
#include <Urho3D/Graphics/PipelineStateTracker.h>
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 |
Helper class to track pipeline state changes caused by derived class.