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 ((rileyVariant, "ri:variant")) \
19 ((xpuDevices, "ri:xpudevices")) \
20 ((integrator, "integrator")) \
21 ((integratorName, "ri:integrator:name")) \
22 ((interactiveIntegrator, "interactiveIntegrator")) \
23 ((interactiveIntegratorTimeout, "interactiveIntegratorTimeout")) \
24 ((dataWindowNDC, "dataWindowNDC")) \
25 ((aspectRatioConformPolicy, "aspectRatioConformPolicy")) \
26 ((pixelAspectRatio, "pixelAspectRatio")) \
27 ((resolution, "resolution")) \
30 ((instantaneousShutter, "instantaneousShutter")) \
31 ((disableMotionBlur, "disableMotionBlur")) \
32 ((disableDepthOfField, "disableDepthOfField")) \
33 ((shutterOpen, "shutter:open")) \
34 ((shutterClose, "shutter:close")) \
35 ((experimentalRenderSpec, "experimental:renderSpec")) \
36 ((renderVariant, "renderVariant")) \
37 ((xpuCpuConfig, "xpuCpuConfig")) \
38 ((xpuGpuConfig, "xpuGpuConfig")) \
39 ((delegateRenderProducts, "delegateRenderProducts")) \
40 ((projection, "projection")) \
41 ((projectionName, "ri:projection:name")) \
42 ((enableInteractive, "enableInteractive")) \
43 ((batchCommandLine, "batchCommandLine")) \
44 ((houdiniFrame, "houdini:frame")) \
45 ((checkpointInterval, "ri:checkpoint:interval")) \
46 ((pixelFilter, "ri:Ri:PixelFilterName")) \
47 ((pixelFilterWidth, "ri:Ri:PixelFilterWidth"))
50 HDPRMAN_RENDER_SETTINGS_TOKENS);
52#define HDPRMAN_EXPERIMENTAL_RENDER_SPEC_TOKENS \
64 HDPRMAN_EXPERIMENTAL_RENDER_SPEC_TOKENS);
66#define HDPRMAN_INTEGRATOR_TOKENS \
72#define HDPRMAN_PROJECTION_TOKENS \
77 HDPRMAN_INTEGRATOR_TOKENS);
79#define HDPRMAN_RENDER_PRODUCT_TOKENS \
86 HdPrmanRenderProductTokens, HDPRMAN_API,
87 HDPRMAN_RENDER_PRODUCT_TOKENS);
90 HDPRMAN_PROJECTION_TOKENS);
92#define HDPRMAN_AOV_SETTINGS_TOKENS \
93 ((dataType, "dataType")) \
94 ((sourceName, "sourceName")) \
95 ((sourceType, "sourceType")) \
96 ((format, "aovDescriptor.format")) \
97 ((multiSampled, "aovDescriptor.multiSampled")) \
98 ((aovSettings, "aovDescriptor.aovSettings")) \
99 ((clearValue, "aovDescriptor.clearValue"))
102 HdPrmanAovSettingsTokens, HDPRMAN_API,
103 HDPRMAN_AOV_SETTINGS_TOKENS);
105#if PXR_VERSION <= 2308
108#define HD_ASPECT_RATIO_CONFORM_POLICY \
109 (adjustApertureWidth) \
110 (adjustApertureHeight) \
113 (adjustPixelAspectRatio) \
116 HD_ASPECT_RATIO_CONFORM_POLICY);
119class HdPrmanRenderDelegate :
public HdRenderDelegate
123 HdPrmanRenderDelegate(HdRenderSettingsMap
const& settingsMap);
125 ~HdPrmanRenderDelegate()
override;
133 const TfTokenVector & GetSupportedRprimTypes()
const override;
135 const TfTokenVector & GetSupportedSprimTypes()
const override;
137 const TfTokenVector & GetSupportedBprimTypes()
const override;
139 HdResourceRegistrySharedPtr GetResourceRegistry()
const override;
143 HdRenderSettingDescriptorList GetRenderSettingDescriptors()
const override;
149 HdRenderPassSharedPtr CreateRenderPass(
156 void DestroyInstancer(
HdInstancer *instancer)
override;
159 SdfPath const& rprimId)
override;
161 void DestroyRprim(
HdRprim *rPrim)
override;
164 SdfPath const& sprimId)
override;
168 void DestroySprim(
HdSprim *sPrim)
override;
171 SdfPath const& bprimId)
override;
175 void DestroyBprim(
HdBprim *bPrim)
override;
183 TfToken GetMaterialBindingPurpose()
const override;
189#if HD_API_VERSION > 46
194#if HD_API_VERSION >= 60
196 HdContainerDataSourceHandle GetCapabilities()
const override;
200 void SetRenderSetting(
TfToken const &key,
VtValue const &value)
override;
203 bool IsPauseSupported()
const override {
return true; }
204 bool Pause()
override;
205 bool Resume()
override;
209 bool IsStopSupported()
const override;
213 bool IsStopped()
const override;
217 bool Stop(
bool blocking)
override;
221 bool Restart()
override;
223#if HD_API_VERSION >= 55
232 void SetTerminalSceneIndex(
233 const HdSceneIndexBaseRefPtr &inputSceneIndex)
override;
236 void Update()
override;
238#if HD_API_VERSION >= 71
240 bool IsParallelSyncEnabled(
const TfToken &primType)
const override;
250 HdRenderSettingsMap GetRenderSettingsMap()
const;
253 bool IsInteractive()
const;
260 HdPrmanRenderDelegate(
const HdPrmanRenderDelegate &) =
delete;
261 HdPrmanRenderDelegate &operator =(
const HdPrmanRenderDelegate &) =
delete;
265 std::string _GetRenderVariant(
const HdRenderSettingsMap &settingsMap);
268 int _GetCpuConfig(
const HdRenderSettingsMap &settingsMap);
271 std::vector<int> _GetGpuConfig(
const HdRenderSettingsMap &settingsMap);
278 std::shared_ptr<class HdPrman_RenderParam> _renderParam;
282 struct _RileySceneIndices;
283 std::unique_ptr<_RileySceneIndices> _rileySceneIndices;
285 HdResourceRegistrySharedPtr _resourceRegistry;
286 HdRenderPassSharedPtr _renderPass;
287 HdRenderSettingDescriptorList _settingDescriptors;
290PXR_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.