24#ifndef PXR_IMAGING_HD_ST_RENDER_BUFFER_H
25#define PXR_IMAGING_HD_ST_RENDER_BUFFER_H
29#include "pxr/imaging/hdSt/api.h"
30#include "pxr/imaging/hdSt/textureUtils.h"
31#include "pxr/imaging/hd/renderBuffer.h"
32#include "pxr/imaging/hgi/hgi.h"
33#include "pxr/imaging/hgi/enums.h"
34#include "pxr/imaging/hgi/texture.h"
36PXR_NAMESPACE_OPEN_SCOPE
40using HdStDynamicUvTextureObjectSharedPtr =
41 std::shared_ptr<class HdStDynamicUvTextureObject>;
50 ~HdStRenderBuffer()
override;
55 HdDirtyBits *dirtyBits)
override;
60 bool multiSampled)
override;
63 unsigned int GetWidth()
const override;
69 unsigned int GetDepth()
const override;
72 HdFormat
GetFormat()
const override {
return _format;}
78 uint32_t GetMSAASampleCount()
const;
89 void Unmap()
override;
95 return _mappers.load() != 0;
133 uint32_t _msaaSampleCount;
136 HdStDynamicUvTextureObjectSharedPtr _textureObject;
139 HdStDynamicUvTextureObjectSharedPtr _textureMSAAObject;
142 std::atomic<int> _mappers;
144 HdStTextureUtils::AlignedBuffer<uint8_t> _mappedBuffer;
147PXR_NAMESPACE_CLOSE_SCOPE
Basic type for a vector of 3 int components.
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 Resolve()=0
Resolve the buffer so that reads reflect the latest writes.
virtual unsigned int GetWidth() const =0
Get the buffer's width.
virtual void * Map()=0
Map the buffer for reading.
HD_API void Sync(HdSceneDelegate *sceneDelegate, HdRenderParam *renderParam, HdDirtyBits *dirtyBits) override
Get allocation information from the scene delegate.
virtual unsigned int GetHeight() const =0
Get the buffer's height.
virtual bool IsMapped() const =0
Return whether the buffer is currently mapped by anybody.
virtual void _Deallocate()=0
Deallocate the buffer, freeing any owned resources.
virtual void Unmap()=0
Unmap the buffer. It is no longer safe to read from the buffer.
virtual unsigned int GetDepth() const =0
Get the buffer's depth.
virtual bool IsConverged() const =0
Return whether the buffer is converged (whether the renderer is still adding samples or not).
virtual HdFormat GetFormat() const =0
Get the buffer's per-pixel format.
virtual bool IsMultiSampled() const =0
Get whether the buffer is multisampled.
virtual VtValue GetResource(bool multiSampled) const
This optional API returns a (type-erased) resource that backs this render buffer.
virtual bool Allocate(GfVec3i const &dimensions, HdFormat format, bool multiSampled)=0
Allocate a buffer.
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
Adapter class providing data exchange with the client scene graph.
A central registry of all GPU resources.
Class to identify a texture file or a texture within the texture file (e.g., a frame in a movie).
A path value used to locate objects in layers or scenegraphs.
Provides a container which may hold any type, and provides introspection and iteration over array typ...