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"
22PXR_NAMESPACE_OPEN_SCOPE
37using HdRenderPassSharedPtr = std::shared_ptr<class HdRenderPass>;
38using HdRenderPassStateSharedPtr = std::shared_ptr<class HdRenderPassState>;
39using HdResourceRegistrySharedPtr = std::shared_ptr<class HdResourceRegistry>;
40using HdDriverVector = std::vector<HdDriver*>;
80 virtual bool IsValid()
const;
88typedef TfHashMap<TfToken, VtValue, TfToken::HashFunctor> HdRenderSettingsMap;
104typedef std::vector<HdRenderSettingDescriptor> HdRenderSettingDescriptorList;
108class 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;
488 virtual HdCommandDescriptors GetCommandDescriptors()
const;
499 virtual bool InvokeCommand(
506 const std::string &GetRendererDisplayName() {
527 virtual void SetTerminalSceneIndex(
528 const HdSceneIndexBaseRefPtr &terminalSceneIndex);
536 virtual void Update();
541 virtual bool IsParallelSyncEnabled(
const TfToken &primType)
const;
549 HdRenderDelegate(HdRenderSettingsMap
const& settingsMap);
554 HdRenderDelegate(
const HdRenderDelegate &) =
delete;
555 HdRenderDelegate &operator=(
const HdRenderDelegate &) =
delete;
558 void _PopulateDefaultSettings(
559 HdRenderSettingDescriptorList
const& defaultSettings);
562 HdRenderSettingsMap _settingsMap;
563 unsigned int _settingsVersion;
572 void _SetRendererDisplayName(
const std::string &displayName) {
573 _displayName = displayName;
575 std::string _displayName;
579PXR_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....
Hydra Graphics Interface.
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.