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"
32#include "pxr/imaging/hd/dataSource.h"
38PXR_NAMESPACE_OPEN_SCOPE
52using HdRenderPassSharedPtr = std::shared_ptr<class HdRenderPass>;
53using HdRenderPassStateSharedPtr = std::shared_ptr<class HdRenderPassState>;
54using HdResourceRegistrySharedPtr = std::shared_ptr<class HdResourceRegistry>;
55using HdDriverVector = std::vector<HdDriver*>;
75typedef TfHashMap<TfToken, VtValue, TfToken::HashFunctor> HdRenderSettingsMap;
91typedef std::vector<HdRenderSettingDescriptor> HdRenderSettingDescriptorList;
99 virtual ~HdRenderDelegate();
107 virtual void SetDrivers(HdDriverVector
const& drivers);
113 virtual const TfTokenVector &GetSupportedRprimTypes()
const = 0;
119 virtual const TfTokenVector &GetSupportedSprimTypes()
const = 0;
126 virtual const TfTokenVector &GetSupportedBprimTypes()
const = 0;
147 virtual HdResourceRegistrySharedPtr GetResourceRegistry()
const = 0;
153 virtual void SetRenderSetting(
TfToken const& key,
VtValue const& value);
166 T GetRenderSetting(
TfToken const& key, T
const& defValue)
const {
167 return GetRenderSetting(key).Cast<T>().GetWithDefault(defValue);
174 virtual HdRenderSettingDescriptorList GetRenderSettingDescriptors()
const;
180 virtual unsigned int GetRenderSettingsVersion()
const;
193 virtual HdContainerDataSourceHandle GetCapabilities()
const;
206 virtual bool IsPauseSupported()
const;
213 virtual bool IsPaused()
const;
222 virtual bool Pause();
231 virtual bool Resume();
238 virtual bool IsStopSupported()
const;
245 virtual bool IsStopped()
const;
255 virtual bool Stop(
bool blocking =
true);
264 virtual bool Restart();
278 virtual HdRenderPassSharedPtr CreateRenderPass(
HdRenderIndex *index,
290 virtual HdRenderPassStateSharedPtr CreateRenderPassState()
const;
306 virtual void DestroyInstancer(
HdInstancer *instancer) = 0;
327 virtual void DestroyRprim(
HdRprim *rPrim) = 0;
352 virtual void DestroySprim(
HdSprim *sprim) = 0;
378 virtual void DestroyBprim(
HdBprim *bprim) = 0;
411 virtual TfToken GetMaterialBindingPurpose()
const;
416 virtual TfToken GetMaterialNetworkSelector()
const;
443 virtual bool IsPrimvarFilteringNeeded()
const;
475 virtual HdCommandDescriptors GetCommandDescriptors()
const;
486 virtual bool InvokeCommand(
493 const std::string &GetRendererDisplayName() {
514 virtual void SetTerminalSceneIndex(
515 const HdSceneIndexBaseRefPtr &terminalSceneIndex);
523 virtual void Update();
526 bool IsParallelSyncEnabled(
TfToken primType)
const;
534 HdRenderDelegate(HdRenderSettingsMap
const& settingsMap);
539 HdRenderDelegate(
const HdRenderDelegate &) =
delete;
540 HdRenderDelegate &operator=(
const HdRenderDelegate &) =
delete;
543 void _PopulateDefaultSettings(
544 HdRenderSettingDescriptorList
const& defaultSettings);
547 HdRenderSettingsMap _settingsMap;
548 unsigned int _settingsVersion;
552 friend class HdRendererPluginRegistry;
557 void _SetRendererDisplayName(
const std::string &displayName) {
558 _displayName = displayName;
560 std::string _displayName;
564PXR_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),...
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.