All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdSt_SamplerObjectRegistry Class Referencefinal

#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 HdStResourceRegistryGetResourceRegistry () const

Detailed Description

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.

Constructor & Destructor Documentation

HDST_API HdSt_SamplerObjectRegistry::HdSt_SamplerObjectRegistry ( HdStResourceRegistry registry)
HDST_API HdSt_SamplerObjectRegistry::~HdSt_SamplerObjectRegistry ( )

Member Function Documentation

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.

HDST_API void HdSt_SamplerObjectRegistry::GarbageCollect ( )

Delete samplers no longer used by a client.

HDST_API HdStResourceRegistry* HdSt_SamplerObjectRegistry::GetResourceRegistry ( ) const

Get resource registry

HDST_API void HdSt_SamplerObjectRegistry::MarkGarbageCollectionNeeded ( )

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