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;
203 virtual bool IsPaused()
const;
212 virtual bool Pause();
221 virtual bool Resume();
228 virtual bool IsStopSupported()
const;
235 virtual bool IsStopped()
const;
245 virtual bool Stop(
bool blocking =
true);
254 virtual bool Restart();
268 virtual HdRenderPassSharedPtr CreateRenderPass(
HdRenderIndex *index,
280 virtual HdRenderPassStateSharedPtr CreateRenderPassState()
const;
296 virtual void DestroyInstancer(
HdInstancer *instancer) = 0;
317 virtual void DestroyRprim(
HdRprim *rPrim) = 0;
342 virtual void DestroySprim(
HdSprim *sprim) = 0;
368 virtual void DestroyBprim(
HdBprim *bprim) = 0;
401 virtual TfToken GetMaterialBindingPurpose()
const;
406 virtual TfToken GetMaterialNetworkSelector()
const;
425 virtual bool IsPrimvarFilteringNeeded()
const;
457 virtual HdCommandDescriptors GetCommandDescriptors()
const;
468 virtual bool InvokeCommand(
475 const std::string &GetRendererDisplayName() {
485 HdRenderDelegate(HdRenderSettingsMap
const& settingsMap);
490 HdRenderDelegate(
const HdRenderDelegate &) =
delete;
491 HdRenderDelegate &operator=(
const HdRenderDelegate &) =
delete;
494 void _PopulateDefaultSettings(
495 HdRenderSettingDescriptorList
const& defaultSettings);
498 HdRenderSettingsMap _settingsMap;
499 unsigned int _settingsVersion;
503 friend class HdRendererPluginRegistry;
508 void _SetRendererDisplayName(
const std::string &displayName) {
509 _displayName = displayName;
511 std::string _displayName;
515 PXR_NAMESPACE_CLOSE_SCOPE
517 #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...