|
Rebel Fork Framework
|
Pipeline state cache for RenderPipeline batches. More...
#include <Urho3D/RenderPipeline/BatchStateCache.h>
Public Member Functions | |
| void | Invalidate () |
| Invalidate cache. | |
| void | SetOutputDesc (const PipelineStateOutputDesc &outputDesc) |
| Set currently used output description. Invalidates cache if it has changed. | |
| PipelineState * | GetPipelineState (const BatchStateLookupKey &key) const |
| PipelineState * | GetOrCreatePipelineState (const BatchStateCreateKey &key, const BatchStateCreateContext &ctx, BatchStateCacheCallback *callback) |
| PipelineState * | GetOrCreatePlaceholderPipelineState (unsigned vertexStride, BatchStateCacheCallback *callback) |
Private Attributes | |
| ea::optional< PipelineStateOutputDesc > | outputDesc_ |
| Current output description. Invalid on start. | |
| ea::unordered_map< BatchStateLookupKey, CachedBatchState > | cache_ |
| Cached states, possibly invalid. | |
| ea::unordered_map< unsigned, SharedPtr< PipelineState > > | placeholderCache_ |
| Cached placeholder states. | |
Additional Inherited Members | |
Protected Member Functions inherited from Urho3D::NonCopyable | |
| NonCopyable (const NonCopyable &other)=delete | |
| NonCopyable (NonCopyable &&other)=delete | |
| NonCopyable & | operator= (const NonCopyable &other)=delete |
| NonCopyable & | operator= (NonCopyable &&other)=delete |
Pipeline state cache for RenderPipeline batches.
| PipelineState * Urho3D::BatchStateCache::GetOrCreatePipelineState | ( | const BatchStateCreateKey & | key, |
| const BatchStateCreateContext & | ctx, | ||
| BatchStateCacheCallback * | callback | ||
| ) |
Return existing or create new pipeline state. Not thread safe. Resulting state may be invalid.
| PipelineState * Urho3D::BatchStateCache::GetOrCreatePlaceholderPipelineState | ( | unsigned | vertexStride, |
| BatchStateCacheCallback * | callback | ||
| ) |
Return existing or create new placeholder pipeline state. Not thread safe. Resulting state may be invalid in case of emergencies.
| PipelineState * Urho3D::BatchStateCache::GetPipelineState | ( | const BatchStateLookupKey & | key | ) | const |
Return existing pipeline state or nullptr if not found. Thread-safe. Resulting state may be invalid.