24 #ifndef PXR_IMAGING_HD_RENDER_DELEGATE_H
25 #define PXR_IMAGING_HD_RENDER_DELEGATE_H
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/aov.h"
30 #include "pxr/imaging/hd/changeTracker.h"
31 #include "pxr/imaging/hd/command.h"
37 PXR_NAMESPACE_OPEN_SCOPE
49 using HdRenderPassSharedPtr = std::shared_ptr<class HdRenderPass>;
50 using HdRenderPassStateSharedPtr = std::shared_ptr<class HdRenderPassState>;
51 using HdResourceRegistrySharedPtr = std::shared_ptr<class HdResourceRegistry>;
52 using HdDriverVector = std::vector<HdDriver*>;
72 typedef TfHashMap<TfToken, VtValue, TfToken::HashFunctor> HdRenderSettingsMap;
88 typedef std::vector<HdRenderSettingDescriptor> HdRenderSettingDescriptorList;
92 class HdRenderDelegate
96 virtual ~HdRenderDelegate();
104 virtual void SetDrivers(HdDriverVector
const& drivers);
110 virtual const TfTokenVector &GetSupportedRprimTypes()
const = 0;
116 virtual const TfTokenVector &GetSupportedSprimTypes()
const = 0;
123 virtual const TfTokenVector &GetSupportedBprimTypes()
const = 0;
144 virtual HdResourceRegistrySharedPtr GetResourceRegistry()
const = 0;
150 virtual void SetRenderSetting(
TfToken const& key,
VtValue const& value);
163 T GetRenderSetting(
TfToken const& key, T
const& defValue)
const {
164 return GetRenderSetting(key).Cast<T>().GetWithDefault(defValue);
171 virtual HdRenderSettingDescriptorList GetRenderSettingDescriptors()
const;
177 virtual unsigned int GetRenderSettingsVersion()
const;
196 virtual bool IsPauseSupported()
const;
205 virtual bool Pause();
214 virtual bool Resume();
221 virtual bool IsStopSupported()
const;
239 virtual bool Restart();
253 virtual HdRenderPassSharedPtr CreateRenderPass(
HdRenderIndex *index,
265 virtual HdRenderPassStateSharedPtr CreateRenderPassState()
const;
281 virtual void DestroyInstancer(
HdInstancer *instancer) = 0;
302 virtual void DestroyRprim(
HdRprim *rPrim) = 0;
327 virtual void DestroySprim(
HdSprim *sprim) = 0;
353 virtual void DestroyBprim(
HdBprim *bprim) = 0;
386 virtual TfToken GetMaterialBindingPurpose()
const;
391 virtual TfToken GetMaterialNetworkSelector()
const;
410 virtual bool IsPrimvarFilteringNeeded()
const;
442 virtual HdCommandDescriptors GetCommandDescriptors()
const;
453 virtual bool InvokeCommand(
464 HdRenderDelegate(HdRenderSettingsMap
const& settingsMap);
469 HdRenderDelegate(
const HdRenderDelegate &) =
delete;
470 HdRenderDelegate &operator=(
const HdRenderDelegate &) =
delete;
473 void _PopulateDefaultSettings(
474 HdRenderSettingDescriptorList
const& defaultSettings);
477 HdRenderSettingsMap _settingsMap;
478 unsigned int _settingsVersion;
481 PXR_NAMESPACE_CLOSE_SCOPE
483 #endif //PXR_IMAGING_HD_RENDER_DELEGATE_H
The Hydra render index is a flattened representation of the client scene graph, which may be composed...
HdRenderSettingDescriptor represents a render setting that a render delegate wants to export (e...
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.
The HdRenderParam is an opaque (to core Hydra) handle, to an object that is obtained from the render ...
Token for efficient comparison, assignment, and hashing of known strings.
An abstract class representing a single render iteration over a set of prims (the HdRprimCollection)...
HdDriver represents a device object, commonly a render device, that is owned by the application and p...
The render engine state for a given rprim from the scene graph.
Adapter class providing data exchange with the client scene graph.
std::vector< TfToken > TfTokenVector
Convenience types.
A named, semantic collection of objects.
A path value used to locate objects in layers or scenegraphs.
Sprim (state prim) is a base class of managing state for non-drawable scene entity (e...
Bprim (buffer prim) is a base class of managing a blob of data that is used to communicate between th...
A bundle of state describing an AOV ("Arbitrary Output Variable") display channel.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...