HDK
|
#include <samplerObjectRegistry.h>
Public Member Functions | |
HDST_API | HdSt_SamplerObjectRegistry (HdStResourceRegistry *registry) |
HDST_API | ~HdSt_SamplerObjectRegistry () |
HDST_API HdStSamplerObjectSharedPtr | AllocateSampler (HdStTextureObjectSharedPtr const &texture, HdSamplerParameters const &samplerParameters) |
HDST_API void | GarbageCollect () |
Delete samplers no longer used by a client. More... | |
HDST_API void | MarkGarbageCollectionNeeded () |
HDST_API HdStResourceRegistry * | GetResourceRegistry () const |
A simple registry for GPU samplers.
The registry makes no attempt at de-duplication. But construction is dispatched by texture type returing a matching sampler (e.g., HdStFieldSamplerObject for a HdStFieldTextureObject or HdStPtexSamplerObject for the (not yet existing) HdStPtexTextureObject). Also, it keeps a shared pointer to a sampler around until garbage collection so that clients can safely drop their shared pointers from different threads.
Definition at line 54 of file samplerObjectRegistry.h.
|
explicit |
HDST_API HdSt_SamplerObjectRegistry::~HdSt_SamplerObjectRegistry | ( | ) |
HDST_API HdStSamplerObjectSharedPtr HdSt_SamplerObjectRegistry::AllocateSampler | ( | HdStTextureObjectSharedPtr const & | texture, |
HdSamplerParameters const & | samplerParameters | ||
) |
Create new sampler object matching the given texture object.
The associated GPU resource is created immediately and the call is not thread-safe.
Delete samplers no longer used by a client.
HDST_API HdStResourceRegistry* HdSt_SamplerObjectRegistry::GetResourceRegistry | ( | ) | const |
Get resource registry