24 #ifndef PXR_IMAGING_PLUGIN_HD_EMBREE_RENDER_DELEGATE_H
25 #define PXR_IMAGING_PLUGIN_HD_EMBREE_RENDER_DELEGATE_H
28 #include "pxr/imaging/hd/renderDelegate.h"
29 #include "pxr/imaging/hd/renderThread.h"
30 #include "pxr/imaging/plugin/hdEmbree/renderer.h"
34 #include <embree3/rtcore.h>
36 PXR_NAMESPACE_OPEN_SCOPE
40 #define HDEMBREE_RENDER_SETTINGS_TOKENS \
41 (enableAmbientOcclusion) \
43 (ambientOcclusionSamples)
118 virtual HdRenderSettingDescriptorList
125 virtual bool Pause()
override;
128 virtual bool Resume()
override;
164 SdfPath const& rprimId)
override;
178 SdfPath const& sprimId)
override;
198 SdfPath const& bprimId)
override;
224 return HdTokens->full;
246 static std::mutex _mutexResourceRegistry;
247 static std::atomic_int _counterResourceRegistry;
248 static HdResourceRegistrySharedPtr _resourceRegistry;
258 RTCDevice _rtcDevice;
264 std::atomic<int> _sceneVersion;
268 std::shared_ptr<HdEmbreeRenderParam> _renderParam;
279 HdRenderSettingDescriptorList _settingDescriptors;
283 static void HandleRtcError(
void* userPtr, RTCError code,
const char *msg);
287 PXR_NAMESPACE_CLOSE_SCOPE
289 #endif // PXR_IMAGING_PLUGIN_HD_EMBREE_RENDER_DELEGATE_H
virtual bool Resume() override
Resume background rendering threads.
virtual void DestroySprim(HdSprim *sPrim) override
Destroy an Sprim created with CreateSprim or CreateFallbackSprim.
virtual HdBprim * CreateBprim(TfToken const &typeId, SdfPath const &bprimId) override
Create a hydra Bprim, representing data buffers such as textures.
The render delegate can create an object of type HdRenderParam, to pass to each prim during Sync()...
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
virtual ~HdEmbreeRenderDelegate()
Render delegate destructor.
virtual bool Pause() override
Pause background rendering threads.
virtual const TfTokenVector & GetSupportedSprimTypes() const override
Return a list of which Sprim types can be created by this class's CreateSprim.
virtual HdRprim * CreateRprim(TfToken const &typeId, SdfPath const &rprimId) override
Create a hydra Rprim, representing scene geometry.
Tracks changes from the HdSceneDelegate, providing invalidation cues to the render engine...
This class exists to facilitate point cloud style instancing.
A map with string keys and VtValue values.
virtual void DestroyBprim(HdBprim *bPrim) override
Destroy a Bprim created with CreateBprim or CreateFallbackBprim.
virtual HdResourceRegistrySharedPtr GetResourceRegistry() const override
Returns the HdResourceRegistry instance used by this render delegate.
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
virtual HdSprim * CreateSprim(TfToken const &typeId, SdfPath const &sprimId) override
Create a hydra Sprim, representing scene or viewport state like cameras or lights.
virtual HdRenderPassSharedPtr CreateRenderPass(HdRenderIndex *index, HdRprimCollection const &collection) override
Create a renderpass.
virtual VtDictionary GetRenderStats() const override
This function allows the renderer to report back some useful statistics that the application can disp...
Token for efficient comparison, assignment, and hashing of known strings.
The render engine state for a given rprim from the scene graph.
virtual void CommitResources(HdChangeTracker *tracker) override
This function is called after new scene data is pulled during prim Sync(), but before any tasks (such...
Render delegates provide renderer-specific functionality to the render index, the main hydra state ma...
Adapter class providing data exchange with the client scene graph.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
virtual HdAovDescriptor GetDefaultAovDescriptor(TfToken const &name) const override
This function returns the default AOV descriptor for a given named AOV.
std::vector< TfToken > TfTokenVector
Convenience types.
A named, semantic collection of objects.
virtual bool IsPauseSupported() const override
Return true to indicate that pausing and resuming are supported.
A path value used to locate objects in layers or scenegraphs.
virtual void DestroyInstancer(HdInstancer *instancer) override
Destroy an instancer created with CreateInstancer.
Sprim (state prim) is a base class of managing state for non-drawable scene entity (e...
virtual HdInstancer * CreateInstancer(HdSceneDelegate *delegate, SdfPath const &id) override
Create an instancer.
virtual HdBprim * CreateFallbackBprim(TfToken const &typeId) override
Create a hydra Bprim using default values, and with no scene graph binding.
This file defines some macros that are useful for declaring and using static TfTokens.
HdEmbreeRenderer implements a renderer on top of Embree's raycasting abilities.
Bprim (buffer prim) is a base class of managing a blob of data that is used to communicate between th...
virtual const TfTokenVector & GetSupportedBprimTypes() const override
Return a list of which Bprim types can be created by this class's CreateBprim.
virtual const TfTokenVector & GetSupportedRprimTypes() const override
Return a list of which Rprim types can be created by this class's CreateRprim.
A bundle of state describing an AOV ("Arbitrary Output Variable") display channel.
virtual HdRenderSettingDescriptorList GetRenderSettingDescriptors() const override
Returns a list of user-configurable render settings.
virtual void DestroyRprim(HdRprim *rPrim) override
Destroy an Rprim created with CreateRprim.
HdRenderThread is a utility that specific render delegates can choose to use depending on their needs...
virtual TfToken GetMaterialBindingPurpose() const override
This function tells the scene which material variant to reference.
HdEmbreeRenderDelegate()
Render delegate constructor.
virtual HdRenderParam * GetRenderParam() const override
Return this delegate's render param.
virtual HdSprim * CreateFallbackSprim(TfToken const &typeId) override
Create a hydra Sprim using default values, and with no scene graph binding.