24 #ifndef PXR_IMAGING_HD_BUFFER_ARRAY_RANGE_H
25 #define PXR_IMAGING_HD_BUFFER_ARRAY_RANGE_H
67 virtual bool IsValid()
const = 0;
80 virtual bool Resize(
int numElements) = 0;
116 virtual void DebugDump(std::ostream &out)
const = 0;
132 HdBufferArrayRange &
operator=(
const HdBufferArrayRange &) =
delete;
166 std::vector<HdBufferArrayRangeSharedPtr> _ranges;
172 #endif // PXR_IMAGING_HD_BUFFER_ARRAY_RANGE_H
virtual int GetByteOffset(TfToken const &resourceName) const =0
virtual bool IsValid() const =0
Returns true if this range is valid.
HdBufferArrayRangeContainer(int size)
Constructor.
virtual bool IsImmutable() const =0
Returns true if this range is marked as immutable.
HD_API HdBufferArrayRangeSharedPtr const & Get(int index) const
virtual bool RequiresStaging() const =0
Returns true if this needs a staging buffer for CPU to GPU copies.
virtual VtValue ReadData(TfToken const &name) const =0
Read back the buffer content.
virtual size_t GetVersion() const =0
Returns the version of the buffer array.
virtual void DebugDump(std::ostream &out) const =0
Debug output.
virtual size_t GetNumElements() const =0
Returns the number of elements.
virtual void GetBufferSpecs(HdBufferSpecVector *bufferSpecs) const =0
Gets the bufferSpecs for all resources.
virtual bool IsAssigned() const =0
Returns true is the range has been assigned to a buffer.
virtual void CopyData(HdBufferSourceSharedPtr const &bufferSource)=0
Copy source data into buffer.
HD_API void Set(int index, HdBufferArrayRangeSharedPtr const &range)
GLuint const GLchar * name
std::vector< struct HdBufferSpec > HdBufferSpecVector
virtual size_t GetMaxNumElements() const =0
Returns the max number of elements.
bool IsAggregatedWith(HdBufferArrayRangeSharedPtr const &other) const
Returns true if the underlying buffer array is aggregated to other's.
HdBufferArrayRange & operator=(const HdBufferArrayRange &)=delete
virtual HD_API ~HdBufferArrayRange()
HD_API HdBufferArrayRange()
virtual void IncrementVersion()=0
virtual bool Resize(int numElements)=0
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
virtual const void * _GetAggregation() const =0
Returns the aggregation container to be used in IsAggregatedWith()
HD_API void Resize(int size)
virtual void SetBufferArray(HdBufferArray *bufferArray)=0
Sets the buffer array associated with this buffer;.
#define PXR_NAMESPACE_CLOSE_SCOPE
std::shared_ptr< HdBufferArrayRange > HdBufferArrayRangeSharedPtr
HD_API std::ostream & operator<<(std::ostream &out, const HdBufferArrayRange &self)
std::shared_ptr< class HdBufferSource > HdBufferSourceSharedPtr
virtual int GetElementOffset() const =0
virtual HdBufferArrayUsageHint GetUsageHint() const =0
Gets the usage hint on the underlying buffer array.