All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange Class Referencefinal

Specialized buffer array range for SimpleBufferArray. More...

+ Inheritance diagram for HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange:

Public Member Functions

 _SimpleBufferArrayRange (HdStResourceRegistry *resourceRegistry)
 Constructor. More...
 
bool IsValid () const override
 Returns true if this range is valid. More...
 
HDST_API bool IsAssigned () const override
 Returns true is the range has been assigned to a buffer. More...
 
bool IsImmutable () const override
 Returns true if this range is marked as immutable. More...
 
bool Resize (int numElements) override
 Resize memory area for this range. More...
 
HDST_API void CopyData (HdBufferSourceSharedPtr const &bufferSource) override
 Copy source data into buffer. More...
 
HDST_API VtValue ReadData (TfToken const &name) const override
 Read back the buffer content. More...
 
int GetElementOffset () const override
 Returns the offset at which this range begins in the underlying buffer array in terms of elements. More...
 
int GetByteOffset (TfToken const &resourceName) const override
 Returns the byte offset at which this range begins in the underlying buffer array for the given resource. More...
 
size_t GetNumElements () const override
 Returns the number of elements allocated. More...
 
int GetCapacity () const
 Returns the capacity of allocated area for this range. More...
 
size_t GetVersion () const override
 Returns the version of the buffer array. More...
 
void IncrementVersion () override
 Increment the version of the buffer array. More...
 
HDST_API size_t GetMaxNumElements () const override
 Returns the max number of elements. More...
 
HDST_API HdBufferArrayUsageHint GetUsageHint () const override
 Returns the usage hint from the underlying buffer array. More...
 
HDST_API
HdStBufferResourceSharedPtr 
GetResource () const override
 Returns the GPU resource. More...
 
HDST_API
HdStBufferResourceSharedPtr 
GetResource (TfToken const &name) override
 Returns the named GPU resource. More...
 
HDST_API
HdStBufferResourceNamedList
const & 
GetResources () const override
 Returns the list of all named GPU resources for this bufferArrayRange. More...
 
HDST_API void SetBufferArray (HdBufferArray *bufferArray) override
 Sets the buffer array associated with this buffer;. More...
 
HDST_API void DebugDump (std::ostream &out) const override
 Debug dump. More...
 
void Invalidate ()
 Make this range invalid. More...
 
- Public Member Functions inherited from HdStBufferArrayRange
 HdStBufferArrayRange (HdStResourceRegistry *resourceRegistry)
 
virtual HDST_API ~HdStBufferArrayRange ()
 Destructor (do nothing). More...
 
virtual HDST_API void GetBufferSpecs (HdBufferSpecVector *bufferSpecs) const override
 Sets the bufferSpecs for all resources. More...
 
- Public Member Functions inherited from HdBufferArrayRange
virtual HD_API ~HdBufferArrayRange ()
 Destructor (do nothing). More...
 
bool IsAggregatedWith (HdBufferArrayRangeSharedPtr const &other) const
 Returns true if the underlying buffer array is aggregated to other's. More...
 

Protected Member Functions

HDST_API const void * _GetAggregation () const override
 Returns the aggregation container. More...
 
HDST_API
HdStBufferResourceSharedPtr 
_AddResource (TfToken const &name, HdTupleType tupleType, int offset, int stride)
 Adds a new, named GPU resource and returns it. More...
 
- Protected Member Functions inherited from HdStBufferArrayRange
HdStResourceRegistryGetResourceRegistry ()
 
- Protected Member Functions inherited from HdBufferArrayRange
 HdBufferArrayRange (const HdBufferArrayRange &)=delete
 
HdBufferArrayRangeoperator= (const HdBufferArrayRange &)=delete
 

Detailed Description

Specialized buffer array range for SimpleBufferArray.

Definition at line 87 of file vboSimpleMemoryManager.h.

Constructor & Destructor Documentation

_SimpleBufferArrayRange ( HdStResourceRegistry resourceRegistry)
inline

Constructor.

Definition at line 91 of file vboSimpleMemoryManager.h.

Member Function Documentation

HDST_API HdStBufferResourceSharedPtr _AddResource ( TfToken const &  name,
HdTupleType  tupleType,
int  offset,
int  stride 
)
protected

Adds a new, named GPU resource and returns it.

HDST_API const void* _GetAggregation ( ) const
overrideprotectedvirtual

Returns the aggregation container.

Implements HdBufferArrayRange.

HDST_API void CopyData ( HdBufferSourceSharedPtr const &  bufferSource)
overridevirtual

Copy source data into buffer.

Implements HdBufferArrayRange.

HDST_API void DebugDump ( std::ostream &  out) const
overridevirtual

Debug dump.

Implements HdBufferArrayRange.

int GetByteOffset ( TfToken const &  resourceName) const
inlineoverridevirtual

Returns the byte offset at which this range begins in the underlying buffer array for the given resource.

Implements HdBufferArrayRange.

Definition at line 132 of file vboSimpleMemoryManager.h.

int GetCapacity ( ) const
inline

Returns the capacity of allocated area for this range.

Definition at line 143 of file vboSimpleMemoryManager.h.

int GetElementOffset ( ) const
inlineoverridevirtual

Returns the offset at which this range begins in the underlying buffer array in terms of elements.

Implements HdBufferArrayRange.

Definition at line 126 of file vboSimpleMemoryManager.h.

HDST_API size_t GetMaxNumElements ( ) const
overridevirtual

Returns the max number of elements.

Implements HdBufferArrayRange.

size_t GetNumElements ( ) const
inlineoverridevirtual

Returns the number of elements allocated.

Implements HdBufferArrayRange.

Definition at line 138 of file vboSimpleMemoryManager.h.

HDST_API HdStBufferResourceSharedPtr GetResource ( ) const
overridevirtual

Returns the GPU resource.

If the buffer array contains more than one resource, this method raises a coding error.

Implements HdStBufferArrayRange.

HDST_API HdStBufferResourceSharedPtr GetResource ( TfToken const &  name)
overridevirtual

Returns the named GPU resource.

Implements HdStBufferArrayRange.

HDST_API HdStBufferResourceNamedList const& GetResources ( ) const
overridevirtual

Returns the list of all named GPU resources for this bufferArrayRange.

Implements HdStBufferArrayRange.

HDST_API HdBufferArrayUsageHint GetUsageHint ( ) const
overridevirtual

Returns the usage hint from the underlying buffer array.

Implements HdBufferArrayRange.

size_t GetVersion ( ) const
inlineoverridevirtual

Returns the version of the buffer array.

Implements HdBufferArrayRange.

Definition at line 148 of file vboSimpleMemoryManager.h.

void IncrementVersion ( )
inlineoverridevirtual

Increment the version of the buffer array.

Implements HdBufferArrayRange.

Definition at line 153 of file vboSimpleMemoryManager.h.

void Invalidate ( )
inline

Make this range invalid.

Definition at line 187 of file vboSimpleMemoryManager.h.

HDST_API bool IsAssigned ( ) const
overridevirtual

Returns true is the range has been assigned to a buffer.

Implements HdBufferArrayRange.

bool IsImmutable ( ) const
overridevirtual

Returns true if this range is marked as immutable.

Implements HdBufferArrayRange.

bool IsValid ( ) const
inlineoverridevirtual

Returns true if this range is valid.

Implements HdBufferArrayRange.

Definition at line 98 of file vboSimpleMemoryManager.h.

HDST_API VtValue ReadData ( TfToken const &  name) const
overridevirtual

Read back the buffer content.

Implements HdBufferArrayRange.

bool Resize ( int  numElements)
inlineoverridevirtual

Resize memory area for this range.

Returns true if it causes container buffer reallocation.

Implements HdBufferArrayRange.

Definition at line 111 of file vboSimpleMemoryManager.h.

HDST_API void SetBufferArray ( HdBufferArray bufferArray)
overridevirtual

Sets the buffer array associated with this buffer;.

Implements HdBufferArrayRange.


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