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*>;
58typedef TfHashMap<TfToken, VtValue, TfToken::HashFunctor> HdRenderSettingsMap;
74typedef std::vector<HdRenderSettingDescriptor> HdRenderSettingDescriptorList;
82 virtual ~HdRenderDelegate();
90 virtual void SetDrivers(HdDriverVector
const& drivers);
96 virtual const TfTokenVector &GetSupportedRprimTypes()
const = 0;
102 virtual const TfTokenVector &GetSupportedSprimTypes()
const = 0;
109 virtual const TfTokenVector &GetSupportedBprimTypes()
const = 0;
130 virtual HdResourceRegistrySharedPtr GetResourceRegistry()
const = 0;
136 virtual void SetRenderSetting(
TfToken const& key,
VtValue const& value);
149 T GetRenderSetting(
TfToken const& key, T
const& defValue)
const {
150 return GetRenderSetting(key).Cast<T>().GetWithDefault(defValue);
157 virtual HdRenderSettingDescriptorList GetRenderSettingDescriptors()
const;
163 virtual unsigned int GetRenderSettingsVersion()
const;
176 virtual HdContainerDataSourceHandle GetCapabilities()
const;
189 virtual bool IsPauseSupported()
const;
196 virtual bool IsPaused()
const;
205 virtual bool Pause();
214 virtual bool Resume();
221 virtual bool IsStopSupported()
const;
228 virtual bool IsStopped()
const;
238 virtual bool Stop(
bool blocking =
true);
247 virtual bool Restart();
261 virtual HdRenderPassSharedPtr CreateRenderPass(
HdRenderIndex *index,
273 virtual HdRenderPassStateSharedPtr CreateRenderPassState()
const;
289 virtual void DestroyInstancer(
HdInstancer *instancer) = 0;
310 virtual void DestroyRprim(
HdRprim *rPrim) = 0;
335 virtual void DestroySprim(
HdSprim *sprim) = 0;
361 virtual void DestroyBprim(
HdBprim *bprim) = 0;
394 virtual TfToken GetMaterialBindingPurpose()
const;
399 virtual TfToken GetMaterialNetworkSelector()
const;
426 virtual bool IsPrimvarFilteringNeeded()
const;
458 virtual HdCommandDescriptors GetCommandDescriptors()
const;
469 virtual bool InvokeCommand(
476 const std::string &GetRendererDisplayName() {
497 virtual void SetTerminalSceneIndex(
498 const HdSceneIndexBaseRefPtr &terminalSceneIndex);
506 virtual void Update();
511 virtual bool IsParallelSyncEnabled(
const TfToken &primType)
const;
519 HdRenderDelegate(HdRenderSettingsMap
const& settingsMap);
524 HdRenderDelegate(
const HdRenderDelegate &) =
delete;
525 HdRenderDelegate &operator=(
const HdRenderDelegate &) =
delete;
528 void _PopulateDefaultSettings(
529 HdRenderSettingDescriptorList
const& defaultSettings);
532 HdRenderSettingsMap _settingsMap;
533 unsigned int _settingsVersion;
542 void _SetRendererDisplayName(
const std::string &displayName) {
543 _displayName = displayName;
545 std::string _displayName;
549PXR_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 ...
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.