7#ifndef PXR_IMAGING_PLUGIN_HD_EMBREE_RENDER_BUFFER_H
8#define PXR_IMAGING_PLUGIN_HD_EMBREE_RENDER_BUFFER_H
11#include "pxr/imaging/hd/renderBuffer.h"
13PXR_NAMESPACE_OPEN_SCOPE
18 HdEmbreeRenderBuffer(
SdfPath const&
id);
19 ~HdEmbreeRenderBuffer()
override;
29 HdDirtyBits *dirtyBits)
override;
45 bool Allocate(
GfVec3i const& dimensions,
47 bool multiSampled)
override;
51 unsigned int GetWidth()
const override {
return _width; }
55 unsigned int GetHeight()
const override {
return _height; }
59 unsigned int GetDepth()
const override {
return 1; }
63 HdFormat GetFormat()
const override {
return _format; }
67 bool IsMultiSampled()
const override {
return _multiSampled; }
73 void* Map()
override {
75 return _buffer.data();
79 void Unmap()
override {
85 bool IsMapped()
const override {
86 return _mappers.load() != 0;
92 bool IsConverged()
const override {
93 return _converged.load();
98 void SetConverged(
bool cv) {
103 void Resolve()
override;
116 void Write(
GfVec3i const& pixel,
size_t numComponents,
float const* value);
125 void Write(
GfVec3i const& pixel,
size_t numComponents,
int const* value);
133 void Clear(
size_t numComponents,
float const* value);
141 void Clear(
size_t numComponents,
int const* value);
145 static size_t _GetBufferSize(
GfVec2i const& dims, HdFormat format);
150 static HdFormat _GetSampleFormat(HdFormat format);
153 void _Deallocate()
override;
158 unsigned int _height;
165 std::vector<uint8_t> _buffer;
167 std::vector<uint8_t> _sampleBuffer;
169 std::vector<uint32_t> _sampleCount;
172 std::atomic<int> _mappers;
174 std::atomic<bool> _converged;
177PXR_NAMESPACE_CLOSE_SCOPE
Basic type for a vector of 2 int components.
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...
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 path value used to locate objects in layers or scenegraphs.