HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdBufferArrayRange Class Referenceabstract

#include <bufferArrayRange.h>

+ Inheritance diagram for HdBufferArrayRange:

Public Member Functions

HD_API HdBufferArrayRange ()
 
virtual HD_API ~HdBufferArrayRange ()
 
virtual bool IsValid () const =0
 Returns true if this range is valid. More...
 
virtual bool IsAssigned () const =0
 Returns true is the range has been assigned to a buffer. More...
 
virtual bool IsImmutable () const =0
 Returns true if this range is marked as immutable. More...
 
virtual bool RequiresStaging () const =0
 Returns true if this needs a staging buffer for CPU to GPU copies. More...
 
virtual bool Resize (int numElements)=0
 
virtual void CopyData (HdBufferSourceSharedPtr const &bufferSource)=0
 Copy source data into buffer. More...
 
virtual VtValue ReadData (TfToken const &name) const =0
 Read back the buffer content. More...
 
virtual int GetElementOffset () const =0
 
virtual int GetByteOffset (TfToken const &resourceName) const =0
 
virtual size_t GetNumElements () const =0
 Returns the number of elements. More...
 
virtual size_t GetVersion () const =0
 Returns the version of the buffer array. More...
 
virtual void IncrementVersion ()=0
 
virtual size_t GetMaxNumElements () const =0
 Returns the max number of elements. More...
 
virtual HdBufferArrayUsageHint GetUsageHint () const =0
 Gets the usage hint on the underlying buffer array. More...
 
virtual void SetBufferArray (HdBufferArray *bufferArray)=0
 Sets the buffer array associated with this buffer;. More...
 
virtual void DebugDump (std::ostream &out) const =0
 Debug output. More...
 
bool IsAggregatedWith (HdBufferArrayRangeSharedPtr const &other) const
 Returns true if the underlying buffer array is aggregated to other's. More...
 
virtual void GetBufferSpecs (HdBufferSpecVector *bufferSpecs) const =0
 Gets the bufferSpecs for all resources. More...
 

Protected Member Functions

virtual const void_GetAggregation () const =0
 Returns the aggregation container to be used in IsAggregatedWith() More...
 
 HdBufferArrayRange (const HdBufferArrayRange &)=delete
 
HdBufferArrayRangeoperator= (const HdBufferArrayRange &)=delete
 

Detailed Description

Interface class for representing range (subset) locator of HdBufferArray.

Each memory management strategy defines a specialized range class which is inherited of this interface so that client (drawItem) can be agnostic about the implementation detail of aggregation.

Definition at line 51 of file bufferArrayRange.h.

Constructor & Destructor Documentation

HD_API HdBufferArrayRange::HdBufferArrayRange ( )
virtual HD_API HdBufferArrayRange::~HdBufferArrayRange ( )
virtual

Destructor (do nothing). The specialized range class may want to do something for garbage collection in its destructor. However, be careful not do any substantial work here (obviously including any kind of GL calls), since the destructor gets called frequently on various contexts.

HdBufferArrayRange::HdBufferArrayRange ( const HdBufferArrayRange )
protecteddelete

Member Function Documentation

virtual const void* HdBufferArrayRange::_GetAggregation ( ) const
protectedpure virtual
virtual void HdBufferArrayRange::CopyData ( HdBufferSourceSharedPtr const &  bufferSource)
pure virtual
virtual void HdBufferArrayRange::DebugDump ( std::ostream &  out) const
pure virtual
virtual void HdBufferArrayRange::GetBufferSpecs ( HdBufferSpecVector bufferSpecs) const
pure virtual

Gets the bufferSpecs for all resources.

Implemented in HdStBufferArrayRange.

virtual int HdBufferArrayRange::GetByteOffset ( TfToken const &  resourceName) const
pure virtual

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

Implemented in HdStVBOMemoryManager::_StripedBufferArrayRange, HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange, and HdStInterleavedMemoryManager::_StripedInterleavedBufferRange.

virtual int HdBufferArrayRange::GetElementOffset ( ) const
pure virtual

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

Implemented in HdStVBOMemoryManager::_StripedBufferArrayRange, HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange, and HdStInterleavedMemoryManager::_StripedInterleavedBufferRange.

virtual size_t HdBufferArrayRange::GetMaxNumElements ( ) const
pure virtual
virtual size_t HdBufferArrayRange::GetNumElements ( ) const
pure virtual
virtual HdBufferArrayUsageHint HdBufferArrayRange::GetUsageHint ( ) const
pure virtual
virtual size_t HdBufferArrayRange::GetVersion ( ) const
pure virtual
virtual void HdBufferArrayRange::IncrementVersion ( )
pure virtual

Increment the version of the buffer array. mostly used for notifying drawbatches to be rebuilt to remove expired BufferArrayRange.

Implemented in HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange, HdStVBOMemoryManager::_StripedBufferArrayRange, and HdStInterleavedMemoryManager::_StripedInterleavedBufferRange.

bool HdBufferArrayRange::IsAggregatedWith ( HdBufferArrayRangeSharedPtr const &  other) const
inline

Returns true if the underlying buffer array is aggregated to other's.

Definition at line 119 of file bufferArrayRange.h.

virtual bool HdBufferArrayRange::IsAssigned ( ) const
pure virtual
virtual bool HdBufferArrayRange::IsImmutable ( ) const
pure virtual
virtual bool HdBufferArrayRange::IsValid ( ) const
pure virtual
HdBufferArrayRange& HdBufferArrayRange::operator= ( const HdBufferArrayRange )
protecteddelete
virtual VtValue HdBufferArrayRange::ReadData ( TfToken const &  name) const
pure virtual
virtual bool HdBufferArrayRange::RequiresStaging ( ) const
pure virtual
virtual bool HdBufferArrayRange::Resize ( int  numElements)
pure virtual

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

Implemented in HdStVBOMemoryManager::_StripedBufferArrayRange, HdStVBOSimpleMemoryManager::_SimpleBufferArrayRange, and HdStInterleavedMemoryManager::_StripedInterleavedBufferRange.

virtual void HdBufferArrayRange::SetBufferArray ( HdBufferArray bufferArray)
pure virtual

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