7#ifndef PXR_IMAGING_HD_ST_STRATEGY_BASE_H
8#define PXR_IMAGING_HD_ST_STRATEGY_BASE_H
11#include "pxr/imaging/hdSt/api.h"
13#include "pxr/imaging/hd/bufferSpec.h"
14#include "pxr/imaging/hd/bufferArray.h"
21PXR_NAMESPACE_OPEN_SCOPE
24using HdBufferArraySharedPtr = std::shared_ptr<class HdBufferArray>;
25using HdBufferArrayRangeSharedPtr = std::shared_ptr<class HdBufferArrayRange>;
42 HdBufferSpecVector
const &bufferSpecs,
43 HdBufferArrayUsageHint usageHint) = 0;
51 HdBufferSpecVector
const &bufferSpecs,
52 HdBufferArrayUsageHint usageHint)
const = 0;
56 HdBufferArraySharedPtr
const &bufferArray)
const = 0;
61 HdBufferArraySharedPtr
const &bufferArray,
70PXR_NAMESPACE_CLOSE_SCOPE
Aggregation strategy base class.
size_t AggregationId
Aggregation ID.
virtual HdBufferArraySharedPtr CreateBufferArray(TfToken const &role, HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint)=0
Factory for creating HdBufferArray.
virtual HdBufferArrayRangeSharedPtr CreateBufferArrayRange()=0
Factory for creating HdBufferArrayRange.
virtual HdBufferSpecVector GetBufferSpecs(HdBufferArraySharedPtr const &bufferArray) const =0
Returns the buffer specs from a given buffer array.
virtual AggregationId ComputeAggregationId(HdBufferSpecVector const &bufferSpecs, HdBufferArrayUsageHint usageHint) const =0
Returns id for given bufferSpecs to be used for aggregation.
virtual size_t GetResourceAllocation(HdBufferArraySharedPtr const &bufferArray, VtDictionary &result) const =0
Returns the accumulated GPU resource allocation for items in the BufferArray passed as parameter.
virtual HDST_API void Flush()
(Optional) called to Flush consolidated / staging buffers.
Token for efficient comparison, assignment, and hashing of known strings.
A map with string keys and VtValue values.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...