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

#include <vboSimpleMemoryManager.h>

+ Inheritance diagram for HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange:

Public Member Functions

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

Protected Member Functions

virtual HDST_API const void_GetAggregation () const
 Returns the aggregation container. More...
 
HDST_API
HdStBufferResourceGLSharedPtr 
_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 HdBufferArrayRange
 HdBufferArrayRange (const HdBufferArrayRange &)=delete
 
HdBufferArrayRangeoperator= (const HdBufferArrayRange &)=delete
 

Detailed Description

Specialized buffer array range for SimpleBufferArray.

Definition at line 84 of file vboSimpleMemoryManager.h.

Constructor & Destructor Documentation

HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::_SimpleBufferArrayRange ( )
inline

Constructor.

Definition at line 88 of file vboSimpleMemoryManager.h.

Member Function Documentation

HDST_API HdStBufferResourceGLSharedPtr HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::_AddResource ( TfToken const name,
HdTupleType  tupleType,
int  offset,
int  stride 
)
protected

Adds a new, named GPU resource and returns it.

virtual HDST_API const void* HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::_GetAggregation ( ) const
protectedvirtual

Returns the aggregation container.

Implements HdBufferArrayRange.

virtual HDST_API void HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::CopyData ( HdBufferSourceSharedPtr const bufferSource)
virtual

Copy source data into buffer.

Implements HdBufferArrayRange.

virtual HDST_API void HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::DebugDump ( std::ostream &  out) const
virtual

Debug dump.

Implements HdBufferArrayRange.

virtual int HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetByteOffset ( TfToken const resourceName) const
inlinevirtual

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

Implements HdBufferArrayRange.

Definition at line 127 of file vboSimpleMemoryManager.h.

virtual int HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetCapacity ( ) const
inlinevirtual

Returns the capacity of allocated area for this range.

Definition at line 138 of file vboSimpleMemoryManager.h.

virtual int HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetElementOffset ( ) const
inlinevirtual

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

Implements HdBufferArrayRange.

Definition at line 121 of file vboSimpleMemoryManager.h.

virtual HDST_API size_t HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetMaxNumElements ( ) const
virtual

Returns the max number of elements.

Implements HdBufferArrayRange.

virtual size_t HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetNumElements ( ) const
inlinevirtual

Returns the number of elements allocated.

Implements HdBufferArrayRange.

Definition at line 133 of file vboSimpleMemoryManager.h.

virtual HDST_API HdStBufferResourceGLSharedPtr HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetResource ( ) const
virtual

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

Implements HdStBufferArrayRangeGL.

virtual HDST_API HdStBufferResourceGLSharedPtr HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetResource ( TfToken const name)
virtual

Returns the named GPU resource.

Implements HdStBufferArrayRangeGL.

virtual HDST_API HdStBufferResourceGLNamedList const& HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetResources ( ) const
virtual

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

Implements HdStBufferArrayRangeGL.

virtual HDST_API HdBufferArrayUsageHint HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetUsageHint ( ) const
overridevirtual

Returns the usage hint from the underlying buffer array.

Implements HdBufferArrayRange.

virtual size_t HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::GetVersion ( ) const
inlinevirtual

Returns the version of the buffer array.

Implements HdBufferArrayRange.

Definition at line 143 of file vboSimpleMemoryManager.h.

virtual void HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::IncrementVersion ( )
inlinevirtual

Increment the version of the buffer array.

Implements HdBufferArrayRange.

Definition at line 148 of file vboSimpleMemoryManager.h.

void HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::Invalidate ( )
inline

Make this range invalid.

Definition at line 182 of file vboSimpleMemoryManager.h.

virtual HDST_API bool HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::IsAssigned ( ) const
virtual

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

Implements HdBufferArrayRange.

virtual bool HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::IsImmutable ( ) const
virtual

Returns true if this range is marked as immutable.

Implements HdBufferArrayRange.

virtual bool HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::IsValid ( ) const
inlinevirtual

Returns true if this range is valid.

Implements HdBufferArrayRange.

Definition at line 93 of file vboSimpleMemoryManager.h.

virtual HDST_API VtValue HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::ReadData ( TfToken const name) const
virtual

Read back the buffer content.

Implements HdBufferArrayRange.

virtual bool HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::Resize ( int  numElements)
inlinevirtual

Resize memory area for this range. Returns true if it causes container buffer reallocation.

Implements HdBufferArrayRange.

Definition at line 106 of file vboSimpleMemoryManager.h.

virtual HDST_API void HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange::SetBufferArray ( HdBufferArray bufferArray)
virtual

Sets the buffer array associated with this buffer;.

Implements HdBufferArrayRange.


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