7#ifndef EXT_RMANPKG_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_RENDER_DELEGATE_H
8#define EXT_RMANPKG_PLUGIN_RENDERMAN_PLUGIN_HD_PRMAN_RENDER_DELEGATE_H
11#include "pxr/imaging/hd/renderDelegate.h"
12#include "pxr/imaging/hd/version.h"
13#include "hdPrman/api.h"
15PXR_NAMESPACE_OPEN_SCOPE
17#define HDPRMAN_RENDER_SETTINGS_TOKENS \
18 ((integrator, "integrator")) \
19 ((integratorName, "ri:integrator:name")) \
20 ((interactiveIntegrator, "interactiveIntegrator")) \
21 ((interactiveIntegratorTimeout, "interactiveIntegratorTimeout")) \
22 ((dataWindowNDC, "dataWindowNDC")) \
23 ((aspectRatioConformPolicy, "aspectRatioConformPolicy")) \
24 ((pixelAspectRatio, "pixelAspectRatio")) \
25 ((resolution, "resolution")) \
28 ((instantaneousShutter, "instantaneousShutter")) \
29 ((disableMotionBlur, "disableMotionBlur")) \
30 ((disableDepthOfField, "disableDepthOfField")) \
31 ((shutterOpen, "shutter:open")) \
32 ((shutterClose, "shutter:close")) \
33 ((experimentalRenderSpec, "experimental:renderSpec")) \
34 ((delegateRenderProducts, "delegateRenderProducts")) \
35 ((projection, "projection")) \
36 ((projectionName, "ri:projection:name")) \
37 ((enableInteractive, "enableInteractive")) \
38 ((batchCommandLine, "batchCommandLine")) \
39 ((houdiniFrame, "houdini:frame")) \
40 ((checkpointInterval, "ri:checkpoint:interval")) \
41 ((pixelFilter, "ri:Ri:PixelFilterName")) \
42 ((pixelFilterWidth, "ri:Ri:PixelFilterWidth")) \
43 ((worldOrigin, "ri:trace:worldorigin")) \
44 ((worldOffset, "ri:trace:worldoffset"))
47 HDPRMAN_RENDER_SETTINGS_TOKENS);
49#define HDPRMAN_EXPERIMENTAL_RENDER_SPEC_TOKENS \
61 HDPRMAN_EXPERIMENTAL_RENDER_SPEC_TOKENS);
63#define HDPRMAN_INTEGRATOR_TOKENS \
69#define HDPRMAN_PROJECTION_TOKENS \
74 HDPRMAN_INTEGRATOR_TOKENS);
76#define HDPRMAN_RENDER_PRODUCT_TOKENS \
84 HdPrmanRenderProductTokens, HDPRMAN_API,
85 HDPRMAN_RENDER_PRODUCT_TOKENS);
88 HDPRMAN_PROJECTION_TOKENS);
90#define HDPRMAN_AOV_SETTINGS_TOKENS \
91 ((dataType, "dataType")) \
92 ((sourceName, "sourceName")) \
93 ((sourceType, "sourceType")) \
94 ((format, "aovDescriptor.format")) \
95 ((multiSampled, "aovDescriptor.multiSampled")) \
96 ((aovSettings, "aovDescriptor.aovSettings")) \
97 ((clearValue, "aovDescriptor.clearValue"))
100 HdPrmanAovSettingsTokens, HDPRMAN_API,
101 HDPRMAN_AOV_SETTINGS_TOKENS);
103#if PXR_VERSION <= 2308
106#define HD_ASPECT_RATIO_CONFORM_POLICY \
107 (adjustApertureWidth) \
108 (adjustApertureHeight) \
111 (adjustPixelAspectRatio) \
114 HD_ASPECT_RATIO_CONFORM_POLICY);
117class HdPrmanRenderDelegate :
public HdRenderDelegate
121 HdPrmanRenderDelegate(HdRenderSettingsMap
const& settingsMap,
124 std::vector<int> xpuGpuConfig);
126 ~HdPrmanRenderDelegate()
override;
134 const TfTokenVector & GetSupportedRprimTypes()
const override;
136 const TfTokenVector & GetSupportedSprimTypes()
const override;
138 const TfTokenVector & GetSupportedBprimTypes()
const override;
140 HdResourceRegistrySharedPtr GetResourceRegistry()
const override;
144 HdRenderSettingDescriptorList GetRenderSettingDescriptors()
const override;
150 HdRenderPassSharedPtr CreateRenderPass(
157 void DestroyInstancer(
HdInstancer *instancer)
override;
160 SdfPath const& rprimId)
override;
162 void DestroyRprim(
HdRprim *rPrim)
override;
165 SdfPath const& sprimId)
override;
169 void DestroySprim(
HdSprim *sPrim)
override;
172 SdfPath const& bprimId)
override;
176 void DestroyBprim(
HdBprim *bPrim)
override;
184 TfToken GetMaterialBindingPurpose()
const override;
190#if HD_API_VERSION > 46
195#if HD_API_VERSION >= 60
197 HdContainerDataSourceHandle GetCapabilities()
const override;
201 void SetRenderSetting(
TfToken const &key,
VtValue const &value)
override;
204 bool IsPauseSupported()
const override {
return true; }
205 bool Pause()
override;
206 bool Resume()
override;
210 bool IsStopSupported()
const override;
214 bool IsStopped()
const override;
218 bool Stop(
bool blocking)
override;
222 bool Restart()
override;
224#if HD_API_VERSION >= 55
233 void SetTerminalSceneIndex(
234 const HdSceneIndexBaseRefPtr &inputSceneIndex)
override;
237 void Update()
override;
239#if HD_API_VERSION >= 71
241 bool IsParallelSyncEnabled(
const TfToken &primType)
const override;
251 HdRenderSettingsMap GetRenderSettingsMap()
const;
254 bool IsInteractive()
const;
261 HdPrmanRenderDelegate(
const HdPrmanRenderDelegate &) =
delete;
262 HdPrmanRenderDelegate &operator =(
const HdPrmanRenderDelegate &) =
delete;
266 std::string _GetRenderVariant(
const HdRenderSettingsMap &settingsMap);
269 int _GetCpuConfig(
const HdRenderSettingsMap &settingsMap);
272 std::vector<int> _GetGpuConfig(
const HdRenderSettingsMap &settingsMap);
279 std::shared_ptr<class HdPrman_RenderParam> _renderParam;
283 struct _RileySceneIndices;
284 std::unique_ptr<_RileySceneIndices> _rileySceneIndices;
286 HdResourceRegistrySharedPtr _resourceRegistry;
287 HdRenderPassSharedPtr _renderPass;
288 HdRenderSettingDescriptorList _settingDescriptors;
291PXR_NAMESPACE_CLOSE_SCOPE
Bprim (buffer prim) is a base class of managing a blob of data that is used to communicate between th...
Tracks changes from the HdSceneDelegate, providing invalidation cues to the render engine.
This class exists to facilitate point cloud style instancing.
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
A named, semantic collection of objects.
The render engine state for a given rprim from the scene graph.
Adapter class providing data exchange with the client scene graph.
Sprim (state prim) is a base class of managing state for non-drawable scene entity (e....
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
A map with string keys and VtValue values.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
A bundle of state describing an AOV ("Arbitrary Output Variable") display channel.
std::vector< TfToken > TfTokenVector
Convenience types.