24 #ifndef PXR_IMAGING_HD_RENDER_BUFFER_H
25 #define PXR_IMAGING_HD_RENDER_BUFFER_H
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/bprim.h"
30 #include "pxr/imaging/hd/types.h"
31 #include "pxr/imaging/hd/enums.h"
35 PXR_NAMESPACE_OPEN_SCOPE
54 enum DirtyBits : HdDirtyBits {
56 DirtyDescription = 1 << 0,
57 AllDirty = (DirtyDescription)
63 virtual ~HdRenderBuffer();
77 HdDirtyBits *dirtyBits)
override;
96 bool multiSampled) = 0;
99 virtual unsigned int GetWidth()
const = 0;
101 virtual unsigned int GetHeight()
const = 0;
103 virtual unsigned int GetDepth()
const = 0;
110 virtual void*
Map() = 0;
112 virtual void Unmap() = 0;
138 PXR_NAMESPACE_CLOSE_SCOPE
140 #endif // PXR_IMAGING_HD_RENDER_BUFFER_H
virtual void Unmap()=0
Unmap the buffer. It is no longer safe to read from the buffer.
virtual bool IsMapped() const =0
Return whether the buffer is currently mapped by anybody.
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
virtual unsigned int GetWidth() const =0
Get the buffer's width.
virtual VtValue GetResource(bool multiSampled) const
This optional API returns a (type-erased) resource that backs this render buffer. ...
virtual void _Deallocate()=0
Deallocate the buffer, freeing any owned resources.
Adapter class providing data exchange with the client scene graph.
virtual HD_API void Finalize(HdRenderParam *renderParam) override
Deallocate before deletion.
virtual HdFormat GetFormat() const =0
Get the buffer's per-pixel format.
Basic type for a vector of 3 int components.
A path value used to locate objects in layers or scenegraphs.
virtual bool IsConverged() const =0
Return whether the buffer is converged (whether the renderer is still adding samples or not)...
virtual unsigned int GetHeight() const =0
Get the buffer's height.
virtual unsigned int GetDepth() const =0
Get the buffer's depth.
Bprim (buffer prim) is a base class of managing a blob of data that is used to communicate between th...
A render buffer is a handle to a data resource that can be rendered into, such as a 2d image for a dr...
virtual void * Map()=0
Map the buffer for reading.
virtual bool Allocate(GfVec3i const &dimensions, HdFormat format, bool multiSampled)=0
Allocate a buffer.
virtual HD_API void Sync(HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
Get allocation information from the scene delegate.
virtual HD_API HdDirtyBits GetInitialDirtyBitsMask() const override
Get initial invalidation state.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
virtual bool IsMultiSampled() const =0
Get whether the buffer is multisampled.
virtual void Resolve()=0
Resolve the buffer so that reads reflect the latest writes.