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"
21PXR_NAMESPACE_OPEN_SCOPE
35using HdRenderPassSharedPtr = std::shared_ptr<class HdRenderPass>;
36using HdRenderPassStateSharedPtr = std::shared_ptr<class HdRenderPassState>;
37using HdResourceRegistrySharedPtr = std::shared_ptr<class HdResourceRegistry>;
38using HdDriverVector = std::vector<HdDriver*>;
83typedef TfHashMap<TfToken, VtValue, TfToken::HashFunctor> HdRenderSettingsMap;
99typedef std::vector<HdRenderSettingDescriptor> HdRenderSettingDescriptorList;
103class HdRenderDelegate
107 virtual ~HdRenderDelegate();
115 virtual void SetDrivers(HdDriverVector
const& drivers);
121 virtual const TfTokenVector &GetSupportedRprimTypes()
const = 0;
127 virtual const TfTokenVector &GetSupportedSprimTypes()
const = 0;
134 virtual const TfTokenVector &GetSupportedBprimTypes()
const = 0;
155 virtual HdResourceRegistrySharedPtr GetResourceRegistry()
const = 0;
161 virtual void SetRenderSetting(
TfToken const& key,
VtValue const& value);
174 T GetRenderSetting(
TfToken const& key, T
const& defValue)
const {
175 return GetRenderSetting(key).Cast<T>().GetWithDefault(defValue);
182 virtual HdRenderSettingDescriptorList GetRenderSettingDescriptors()
const;
188 virtual unsigned int GetRenderSettingsVersion()
const;
201 virtual HdContainerDataSourceHandle GetCapabilities()
const;
214 virtual bool IsPauseSupported()
const;
221 virtual bool IsPaused()
const;
230 virtual bool Pause();
239 virtual bool Resume();
246 virtual bool IsStopSupported()
const;
253 virtual bool IsStopped()
const;
263 virtual bool Stop(
bool blocking =
true);
272 virtual bool Restart();
286 virtual HdRenderPassSharedPtr CreateRenderPass(
HdRenderIndex *index,
298 virtual HdRenderPassStateSharedPtr CreateRenderPassState()
const;
314 virtual void DestroyInstancer(
HdInstancer *instancer) = 0;
335 virtual void DestroyRprim(
HdRprim *rPrim) = 0;
360 virtual void DestroySprim(
HdSprim *sprim) = 0;
386 virtual void DestroyBprim(
HdBprim *bprim) = 0;
419 virtual TfToken GetMaterialBindingPurpose()
const;
424 virtual TfToken GetMaterialNetworkSelector()
const;
451 virtual bool IsPrimvarFilteringNeeded()
const;
483 virtual HdCommandDescriptors GetCommandDescriptors()
const;
494 virtual bool InvokeCommand(
501 const std::string &GetRendererDisplayName() {
522 virtual void SetTerminalSceneIndex(
523 const HdSceneIndexBaseRefPtr &terminalSceneIndex);
531 virtual void Update();
536 virtual bool IsParallelSyncEnabled(
const TfToken &primType)
const;
544 HdRenderDelegate(HdRenderSettingsMap
const& settingsMap);
549 HdRenderDelegate(
const HdRenderDelegate &) =
delete;
550 HdRenderDelegate &operator=(
const HdRenderDelegate &) =
delete;
553 void _PopulateDefaultSettings(
554 HdRenderSettingDescriptorList
const& defaultSettings);
557 HdRenderSettingsMap _settingsMap;
558 unsigned int _settingsVersion;
567 void _SetRendererDisplayName(
const std::string &displayName) {
568 _displayName = displayName;
570 std::string _displayName;
574PXR_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.
HdDriver represents a device object, commonly a render device, that is owned by the application and p...
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 ...
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.
virtual HD_API bool SetArbitraryValue(const TfToken &key, const VtValue &value)
Set a custom value in the render param's implementation.
virtual HD_API VtValue GetArbitraryValue(const TfToken &key) const
Retrieve a custom value identified by key from the render param's implementation.
An abstract class representing a single render iteration over a set of prims (the HdRprimCollection),...
This class defines a renderer plugin interface for Hydra.
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.
Abstract interface to scene data.
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_REF_PTRS(type)
Define standard ref pointer types.
A bundle of state describing an AOV ("Arbitrary Output Variable") display channel.
HdRenderSettingDescriptor represents a render setting that a render delegate wants to export (e....
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.