Loading...
Searching...
No Matches
HdRendererPlugin Class Referenceabstract

This class defines a renderer plugin interface for Hydra. More...

#include <rendererPlugin.h>

+ Inheritance diagram for HdRendererPlugin:

Public Member Functions

HD_API TfToken GetPluginId () const
 Look-up plugin id in plugin registry.
 
HD_API std::string GetDisplayName () const
 Look-up display name in plugin registry.
 
Hydra 2.0 API
virtual HD_API bool IsSupported (const HdRendererCreateArgsSchema &rendererCreateArgs, std::string *reasonWhyNot=nullptr) const
 Returns true if this renderer plugin is supported in the running process and false if not.
 
virtual HD_API HdContainerDataSourceHandle GetSceneIndexCreateArgs () const
 Arguments that an application should pass as create arguments to scene indices so that they can be configured for the needs of the renderer.
 
HD_API HdPluginRendererUniqueHandle CreateRenderer (HdSceneIndexBaseRefPtr const &sceneIndex, const HdRendererCreateArgsSchema &rendererCreateArgs)
 Create renderer through the plugin and wrap it in a handle that keeps this plugin alive until the renderer is destroyed.
 
Hydra 1.0 and other deprecated API
virtual bool IsSupported (HdRendererCreateArgs const &rendererCreateArgs, std::string *reasonWhyNot=nullptr) const =0
 
HD_API HdPluginRenderDelegateUniqueHandle 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.
 
virtual HdRenderDelegate * CreateRenderDelegate ()=0
 Clients should use CreateDelegate since this method will eventually become protected, use CreateRenderDelegateHandle instead.
 
virtual HD_API HdRenderDelegate * CreateRenderDelegate (HdRenderSettingsMap const &settingsMap)
 Clients should use CreateDelegate since this method will eventually become protected.
 
virtual void DeleteRenderDelegate (HdRenderDelegate *renderDelegate)=0
 Clients should use CreateDelegate since this method will eventually become protected.
 
- Public Member Functions inherited from HfPluginBase

Protected Member Functions

virtual HD_API std::unique_ptr< HdRenderer_CreateRenderer (HdSceneIndexBaseRefPtr const &sceneIndex, const HdRendererCreateArgsSchema &rendererCreateArgs)
 
HD_API std::unique_ptr< HdRenderer_CreateRendererFromRenderDelegate (HdSceneIndexBaseRefPtr const &sceneIndex, const HdRendererCreateArgsSchema &rendererCreateArgs)
 
- Protected Member Functions inherited from HfPluginBase

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 35 of file rendererPlugin.h.

Member Function Documentation

◆ CreateDelegate()

HD_API HdPluginRenderDelegateUniqueHandle 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.

◆ CreateRenderDelegate() [1/2]

virtual HdRenderDelegate * 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 HdEmbreeRendererPlugin.

◆ CreateRenderDelegate() [2/2]

virtual HD_API HdRenderDelegate * 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 HdEmbreeRendererPlugin.

◆ CreateRenderer()

HD_API HdPluginRendererUniqueHandle CreateRenderer ( HdSceneIndexBaseRefPtr const & sceneIndex,
const HdRendererCreateArgsSchema & 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.

◆ DeleteRenderDelegate()

virtual void DeleteRenderDelegate ( HdRenderDelegate * renderDelegate)
pure virtual

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

Release the object factoried by CreateRenderDelegate().

Implemented in HdEmbreeRendererPlugin.

◆ GetDisplayName()

HD_API std::string GetDisplayName ( ) const

Look-up display name in plugin registry.

◆ GetPluginId()

HD_API TfToken GetPluginId ( ) const

Look-up plugin id in plugin registry.

◆ GetSceneIndexCreateArgs()

virtual HD_API HdContainerDataSourceHandle GetSceneIndexCreateArgs ( ) const
virtual

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

Follows the HdSceneIndexCreateArgsSchema 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 HdEmbreeRendererPlugin.

◆ IsSupported() [1/2]

virtual HD_API bool IsSupported ( const HdRendererCreateArgsSchema & 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 (given the requested configuration/resources provided by rendererCreateArgs).

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

◆ IsSupported() [2/2]

virtual bool IsSupported ( HdRendererCreateArgs const & rendererCreateArgs,
std::string * reasonWhyNot = nullptr ) const
pure virtual
Deprecated
Also implement overload taking HdRendererCreateArgsSchema

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 HdEmbreeRendererPlugin.


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