7 #ifndef PXR_IMAGING_HD_RENDER_DELEGATE_H 8 #define PXR_IMAGING_HD_RENDER_DELEGATE_H 11 #include "pxr/imaging/hd/api.h" 12 #include "pxr/imaging/hd/aov.h" 13 #include "pxr/imaging/hd/changeTracker.h" 14 #include "pxr/imaging/hd/command.h" 15 #include "pxr/imaging/hd/dataSource.h" 16 #include "pxr/imaging/hd/rendererCreateArgs.h" 22 PXR_NAMESPACE_OPEN_SCOPE
37 using HdRenderPassSharedPtr = std::shared_ptr<class HdRenderPass>;
38 using HdRenderPassStateSharedPtr = std::shared_ptr<class HdRenderPassState>;
39 using HdResourceRegistrySharedPtr = std::shared_ptr<class HdResourceRegistry>;
40 using HdDriverVector = std::vector<HdDriver*>;
80 virtual bool IsValid()
const;
88 typedef TfHashMap<TfToken, VtValue, TfToken::HashFunctor> HdRenderSettingsMap;
104 typedef std::vector<HdRenderSettingDescriptor> HdRenderSettingDescriptorList;
108 class HdRenderDelegate
112 virtual ~HdRenderDelegate();
120 virtual void SetDrivers(HdDriverVector
const& drivers);
126 virtual const TfTokenVector &GetSupportedRprimTypes()
const = 0;
132 virtual const TfTokenVector &GetSupportedSprimTypes()
const = 0;
139 virtual const TfTokenVector &GetSupportedBprimTypes()
const = 0;
160 virtual HdResourceRegistrySharedPtr GetResourceRegistry()
const = 0;
166 virtual void SetRenderSetting(
TfToken const& key,
VtValue const& value);
179 T GetRenderSetting(
TfToken const& key, T
const& defValue)
const {
180 return GetRenderSetting(key).Cast<T>().GetWithDefault(defValue);
187 virtual HdRenderSettingDescriptorList GetRenderSettingDescriptors()
const;
193 virtual unsigned int GetRenderSettingsVersion()
const;
206 virtual HdContainerDataSourceHandle GetCapabilities()
const;
219 virtual bool IsPauseSupported()
const;
226 virtual bool IsPaused()
const;
235 virtual bool Pause();
244 virtual bool Resume();
251 virtual bool IsStopSupported()
const;
258 virtual bool IsStopped()
const;
268 virtual bool Stop(
bool blocking =
true);
277 virtual bool Restart();
291 virtual HdRenderPassSharedPtr CreateRenderPass(
HdRenderIndex *index,
303 virtual HdRenderPassStateSharedPtr CreateRenderPassState()
const;
319 virtual void DestroyInstancer(
HdInstancer *instancer) = 0;
340 virtual void DestroyRprim(
HdRprim *rPrim) = 0;
365 virtual void DestroySprim(
HdSprim *sprim) = 0;
391 virtual void DestroyBprim(
HdBprim *bprim) = 0;
424 virtual TfToken GetMaterialBindingPurpose()
const;
429 virtual TfToken GetMaterialNetworkSelector()
const;
456 virtual bool IsPrimvarFilteringNeeded()
const;
498 virtual HdCommandDescriptors GetCommandDescriptors()
const;
509 virtual bool InvokeCommand(
516 const std::string &GetRendererDisplayName() {
537 virtual void SetTerminalSceneIndex(
538 const HdSceneIndexBaseRefPtr &terminalSceneIndex);
546 virtual void Update();
551 virtual bool IsParallelSyncEnabled(
const TfToken &primType)
const;
558 virtual bool RequiresStormTasks()
const;
566 HdRenderDelegate(HdRenderSettingsMap
const& settingsMap);
571 HdRenderDelegate(
const HdRenderDelegate &) =
delete;
572 HdRenderDelegate &operator=(
const HdRenderDelegate &) =
delete;
575 void _PopulateDefaultSettings(
576 HdRenderSettingDescriptorList
const& defaultSettings);
579 HdRenderSettingsMap _settingsMap;
580 unsigned int _settingsVersion;
589 void _SetRendererDisplayName(
const std::string &displayName) {
590 _displayName = displayName;
592 std::string _displayName;
596 PXR_NAMESPACE_CLOSE_SCOPE
598 #endif //PXR_IMAGING_HD_RENDER_DELEGATE_H The render index is part of the Hydra 1.0 API and is only used for emulation purposes so that HdScene...
This class defines a renderer plugin interface for Hydra.
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.
virtual HD_API bool HasArbitraryValue(const TfToken &key) const
Check whether a valid custom value exists for the specified key in the render param's implementation.
Adapter class providing data exchange with the client scene graph.
Abstract interface to scene data.
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....
Hydra Graphics Interface.
virtual HD_API VtValue GetArbitraryValue(const TfToken &key) const
Retrieve a custom value identified by key from the render param's implementation.
virtual HD_API bool SetArbitraryValue(const TfToken &key, const VtValue &value)
Set a custom value in the render param's implementation.
Bprim (buffer prim) is a base class of managing a blob of data that is used to communicate between th...
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
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...