HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdRendererPlugin Class Referenceabstract

#include <rendererPlugin.h>

+ Inheritance diagram for HdRendererPlugin:

Public Member Functions

HD_API TfToken GetPluginId () const
 
HD_API std::string GetDisplayName () const
 
virtual HD_API bool IsSupported (bool gpuEnabled=true) const
 
Hydra 2.0 API
virtual HD_API bool IsSupported (HdContainerDataSourceHandle const &rendererCreateArgs, std::string *reasonWhyNot=nullptr) const
 
virtual HD_API
HdContainerDataSourceHandle 
GetSceneIndexInputArgs () const
 
HD_API HdPluginRendererUniqueHandle CreateRenderer (HdSceneIndexBaseRefPtr const &sceneIndex, HdContainerDataSourceHandle const &rendererCreateArgs)
 
Hydra 1.0 API
virtual bool IsSupported (HdRendererCreateArgs const &rendererCreateArgs, std::string *reasonWhyNot=nullptr) const =0
 
HD_API
HdPluginRenderDelegateUniqueHandle 
CreateDelegate (HdRenderSettingsMap const &settingsMap={})
 
virtual HdRenderDelegateCreateRenderDelegate ()=0
 
virtual HD_API HdRenderDelegateCreateRenderDelegate (HdRenderSettingsMap const &settingsMap)
 
virtual void DeleteRenderDelegate (HdRenderDelegate *renderDelegate)=0
 
- Public Member Functions inherited from HfPluginBase
virtual HF_API ~HfPluginBase ()
 

Protected Member Functions

 HdRendererPlugin ()=default
 
HD_API ~HdRendererPlugin () override
 
virtual HD_API std::unique_ptr
< HdRenderer
_CreateRenderer (HdSceneIndexBaseRefPtr const &sceneIndex, HdContainerDataSourceHandle const &rendererCreateArgs)
 
HD_API std::unique_ptr
< HdRenderer
_CreateRendererFromRenderDelegate (HdSceneIndexBaseRefPtr const &sceneIndex, HdContainerDataSourceHandle const &rendererCreateArgs)
 
- Protected Member Functions inherited from HfPluginBase
HF_API HfPluginBase ()=default
 

Detailed Description

This class defines a renderer plugin interface for Hydra. A renderer plugin is a dynamically discovered and loaded at run-time using the Plug system.

This object has singleton behavior, in that is instantiated once per library (managed by the plugin registry).

The class is used to factory objects that provide delegate support to other parts of the Hydra Ecosystem.

Definition at line 34 of file rendererPlugin.h.

Constructor & Destructor Documentation

HdRendererPlugin::HdRendererPlugin ( )
protecteddefault
HD_API HdRendererPlugin::~HdRendererPlugin ( )
overrideprotected

Member Function Documentation

virtual HD_API std::unique_ptr<HdRenderer> HdRendererPlugin::_CreateRenderer ( HdSceneIndexBaseRefPtr const &  sceneIndex,
HdContainerDataSourceHandle const &  rendererCreateArgs 
)
protectedvirtual
HD_API std::unique_ptr<HdRenderer> HdRendererPlugin::_CreateRendererFromRenderDelegate ( HdSceneIndexBaseRefPtr const &  sceneIndex,
HdContainerDataSourceHandle const &  rendererCreateArgs 
)
protected
HD_API HdPluginRenderDelegateUniqueHandle HdRendererPlugin::CreateDelegate ( HdRenderSettingsMap const &  settingsMap = {})

Create a render delegate through the plugin and wrap it in a handle that keeps this plugin alive until render delegate is destroyed. Initial settings can be passed in.

virtual HdRenderDelegate* HdRendererPlugin::CreateRenderDelegate ( )
pure virtual

Clients should use CreateDelegate since this method will eventually become protected, use CreateRenderDelegateHandle instead.

Factory a Render Delegate object, that Hydra can use to factory prims and communicate with a renderer.

Implemented in HdStormRendererPlugin.

virtual HD_API HdRenderDelegate* HdRendererPlugin::CreateRenderDelegate ( HdRenderSettingsMap const &  settingsMap)
virtual

Clients should use CreateDelegate since this method will eventually become protected.

Factory a Render Delegate object, that Hydra can use to factory prims and communicate with a renderer. Pass in initial settings...

Reimplemented in HdStormRendererPlugin.

HD_API HdPluginRendererUniqueHandle HdRendererPlugin::CreateRenderer ( HdSceneIndexBaseRefPtr const &  sceneIndex,
HdContainerDataSourceHandle const &  rendererCreateArgs 
)

Create renderer through the plugin and wrap it in a handle that keeps this plugin alive until the renderer is destroyed.

The renderer is populated from the given scene index. rendererCreateArgs should conform to HdRendererCreateArgsSchema.

Note that for a seamless transition, this Hydra 2.0 method falls back to creating a Hydra 1.0 render delegate and the necessary "back-end" emulation for render plugins that do not implement the Hydra 2.0 _CreateRenderer.

virtual void HdRendererPlugin::DeleteRenderDelegate ( HdRenderDelegate renderDelegate)
pure virtual

Clients should use CreateDelegate since this method will eventually become protected.

Release the object factoried by CreateRenderDelegate().

Implemented in HdStormRendererPlugin.

HD_API std::string HdRendererPlugin::GetDisplayName ( ) const

Look-up display name in plugin registry.

HD_API TfToken HdRendererPlugin::GetPluginId ( ) const

Look-up plugin id in plugin registry.

virtual HD_API HdContainerDataSourceHandle HdRendererPlugin::GetSceneIndexInputArgs ( ) const
virtual

Arguments that an application should pass as input arguments to scene indices so that they can be configured for the needs of the renderer.

Follows the HdSceneIndexInputArgsSchema but can have data sources at additional data sources.

Example: Some scene indices are computing samples for motion blur non-lazy and need to know whether the renderer supports motion blur in advance.

Example: the configuration of the HdRenderIndexAdapterSceneIndex used by the legacy UsdImagingDelegate which needs the preference order of the material render contexts since it is resolving which material network to use rather than leaving it to a renderer- specific plugin scene index.

Reimplemented in HdStormRendererPlugin.

virtual HD_API bool HdRendererPlugin::IsSupported ( HdContainerDataSourceHandle const &  rendererCreateArgs,
std::string *  reasonWhyNot = nullptr 
) const
virtual

Returns true if this renderer plugin is supported in the running process and false if not.

This gives the plugin a chance to perform some runtime checks to make sure that the system meets minimum requirements. The rendererCreateArgs parameter should conform to HdRendererCreateArgsSchema to indicate the resources available when making this determination.

The reasonWhyNot param, when provided, can be filled with the reason why the renderer plugin is not supported.

virtual bool HdRendererPlugin::IsSupported ( HdRendererCreateArgs const &  rendererCreateArgs,
std::string *  reasonWhyNot = nullptr 
) const
pure virtual

Returns true if this renderer plugin is supported in the running process and false if not.

This gives the plugin a chance to perform some runtime checks to make sure that the system meets minimum requirements. The rendererCreateArgs parameter indicates the resources available when making this determination.

The reasonWhyNot param, when provided, can be filled with the reason why the renderer plugin is not supported.

Implemented in HdStormRendererPlugin.

virtual HD_API bool HdRendererPlugin::IsSupported ( bool  gpuEnabled = true) const
virtual
Deprecated:
Use IsSupported overload below.

Returns true if this renderer plugin is supported in the running process and false if not.

This gives the plugin a chance to perform some runtime checks to make sure that the system meets minimum requirements. The gpuEnabled parameter indicates if the GPU is available for use by the plugin in case this information is necessary to make this determination.


The documentation for this class was generated from the following file: