HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStRenderDelegate Class Referencefinal

#include <renderDelegate.h>

+ Inheritance diagram for HdStRenderDelegate:

Public Member Functions

HDST_API HdStRenderDelegate ()
 
HDST_API HdStRenderDelegate (HdRenderSettingsMap const &settingsMap)
 
HDST_API ~HdStRenderDelegate () override
 
HdRenderDelegate virtual API
HDST_API void SetDrivers (HdDriverVector const &drivers) override
 
HDST_API HdRenderParamGetRenderParam () const override
 
HDST_API const TfTokenVectorGetSupportedRprimTypes () const override
 
HDST_API const TfTokenVectorGetSupportedSprimTypes () const override
 
HDST_API const TfTokenVectorGetSupportedBprimTypes () const override
 
HDST_API
HdResourceRegistrySharedPtr 
GetResourceRegistry () const override
 
HDST_API HdRenderPassSharedPtr CreateRenderPass (HdRenderIndex *index, HdRprimCollection const &collection) override
 
HDST_API HdRenderPassStateSharedPtr CreateRenderPassState () const override
 
HDST_API HdInstancerCreateInstancer (HdSceneDelegate *delegate, SdfPath const &id) override
 
HDST_API void DestroyInstancer (HdInstancer *instancer) override
 
HDST_API HdRprimCreateRprim (TfToken const &typeId, SdfPath const &rprimId) override
 
HDST_API void DestroyRprim (HdRprim *rPrim) override
 
HDST_API HdSprimCreateSprim (TfToken const &typeId, SdfPath const &sprimId) override
 
HDST_API HdSprimCreateFallbackSprim (TfToken const &typeId) override
 
HDST_API void DestroySprim (HdSprim *sPrim) override
 
HDST_API HdBprimCreateBprim (TfToken const &typeId, SdfPath const &bprimId) override
 
HDST_API HdBprimCreateFallbackBprim (TfToken const &typeId) override
 
HDST_API void DestroyBprim (HdBprim *bPrim) override
 
HDST_API void CommitResources (HdChangeTracker *tracker) override
 
HDST_API TfTokenVector GetMaterialRenderContexts () const override
 
HDST_API TfTokenVector GetShaderSourceTypes () const override
 
HDST_API bool IsPrimvarFilteringNeeded () const override
 
HDST_API
HdRenderSettingDescriptorList 
GetRenderSettingDescriptors () const override
 
HDST_API VtDictionary GetRenderStats () const override
 
HDST_API HdAovDescriptor GetDefaultAovDescriptor (TfToken const &name) const override
 
- Public Member Functions inherited from HdRenderDelegate
virtual HD_API ~HdRenderDelegate ()
 
virtual HD_API void SetRenderSetting (TfToken const &key, VtValue const &value)
 
virtual HD_API VtValue GetRenderSetting (TfToken const &key) const
 
template<typename T >
T GetRenderSetting (TfToken const &key, T const &defValue) const
 
virtual HD_API unsigned int GetRenderSettingsVersion () const
 
virtual HD_API bool IsPauseSupported () const
 
virtual HD_API bool IsPaused () const
 
virtual HD_API bool Pause ()
 
virtual HD_API bool Resume ()
 
virtual HD_API bool IsStopSupported () const
 
virtual HD_API bool IsStopped () const
 
virtual HD_API bool Stop (bool blocking=true)
 
virtual HD_API bool Restart ()
 
virtual HD_API TfToken GetMaterialBindingPurpose () const
 
virtual HD_API TfToken GetMaterialNetworkSelector () const
 
virtual HD_API TfTokenVector GetRenderSettingsNamespaces () const
 
virtual HD_API HdCommandDescriptors GetCommandDescriptors () const
 
virtual HD_API bool InvokeCommand (const TfToken &command, const HdCommandArgs &args=HdCommandArgs())
 
HD_API const std::stringGetRendererDisplayName ()
 Populated when instantiated via the HdRendererPluginRegistry. More...
 

Misc public API

HDST_API HdStDrawItemsCachePtr GetDrawItemsCache () const
 
HDST_API HgiGetHgi ()
 
static HDST_API bool IsSupported ()
 

Additional Inherited Members

- Protected Member Functions inherited from HdRenderDelegate
HD_API HdRenderDelegate ()
 This class must be derived from. More...
 
HD_API HdRenderDelegate (HdRenderSettingsMap const &settingsMap)
 Allow derived classes to pass construction-time render settings. More...
 
 HdRenderDelegate (const HdRenderDelegate &)=delete
 
HdRenderDelegateoperator= (const HdRenderDelegate &)=delete
 
HD_API void _PopulateDefaultSettings (HdRenderSettingDescriptorList const &defaultSettings)
 
- Protected Attributes inherited from HdRenderDelegate
HdRenderSettingsMap _settingsMap
 Render settings state. More...
 
unsigned int _settingsVersion
 

Detailed Description

HdStRenderDelegate

The Storm Render Delegate provides a rasterizer renderer to draw the scene. While it currently has some ties to GL, the goal is to use Hgi to allow it to be graphics API agnostic.

Definition at line 51 of file renderDelegate.h.

Constructor & Destructor Documentation

HDST_API HdStRenderDelegate::HdStRenderDelegate ( )
HDST_API HdStRenderDelegate::HdStRenderDelegate ( HdRenderSettingsMap const settingsMap)
HDST_API HdStRenderDelegate::~HdStRenderDelegate ( )
override

Member Function Documentation

HDST_API void HdStRenderDelegate::CommitResources ( HdChangeTracker tracker)
overridevirtual

Sync, Execute & Dispatch Hooks Notification point from the Engine to the delegate. This notification occurs after all Sync's have completed and before task execution.

This notification gives the Render Delegate a chance to update and move memory that the render may need.

For example, the render delegate might fill primvar buffers or texture memory.

Implements HdRenderDelegate.

HDST_API HdBprim* HdStRenderDelegate::CreateBprim ( TfToken const typeId,
SdfPath const bprimId 
)
overridevirtual

Request to Allocate and Construct a new Bprim.

Parameters
typeIdthe type identifier of the prim to allocate
sprimIda unique identifier for the prim
Returns
A pointer to the new prim or nullptr on error.

Implements HdRenderDelegate.

HDST_API HdBprim* HdStRenderDelegate::CreateFallbackBprim ( TfToken const typeId)
overridevirtual

Request to Allocate and Construct a Bprim to use as a standin, if there if an error with another another Bprim of the same type. For example, if another prim references a non-exisiting Bprim, the fallback could be used.

Parameters
typeIdthe type identifier of the prim to allocate
Returns
A pointer to the new prim or nullptr on error.

Implements HdRenderDelegate.

HDST_API HdSprim* HdStRenderDelegate::CreateFallbackSprim ( TfToken const typeId)
overridevirtual

Request to Allocate and Construct an Sprim to use as a standin, if there if an error with another another Sprim of the same type. For example, if another prim references a non-exisiting Sprim, the fallback could be used.

Parameters
typeIdthe type identifier of the prim to allocate
Returns
A pointer to the new prim or nullptr on error.

Implements HdRenderDelegate.

HDST_API HdInstancer* HdStRenderDelegate::CreateInstancer ( HdSceneDelegate delegate,
SdfPath const id 
)
overridevirtual

Instancer Factory Request to create a new instancer.

Parameters
idThe unique identifier of this instancer.
Returns
A pointer to the new instancer or nullptr on error.

Implements HdRenderDelegate.

HDST_API HdRenderPassSharedPtr HdStRenderDelegate::CreateRenderPass ( HdRenderIndex index,
HdRprimCollection const collection 
)
overridevirtual

Renderpass Factory Request to create a new renderpass.

Parameters
indexthe render index to bind to the new renderpass.
collectionthe rprim collection to bind to the new renderpass.
Returns
A shared pointer to the new renderpass or empty on error.

Implements HdRenderDelegate.

HDST_API HdRenderPassStateSharedPtr HdStRenderDelegate::CreateRenderPassState ( ) const
overridevirtual

Request to create a new renderpass state. The default implementation creates an HdRenderPassState instance, but derived render delegates may instantiate their own state type.

Parameters
shaderThe render pass shader to use. If null, a new HdRenderPassShared will be created.
Returns
A shared pointer to the new renderpass state.

Reimplemented from HdRenderDelegate.

HDST_API HdRprim* HdStRenderDelegate::CreateRprim ( TfToken const typeId,
SdfPath const rprimId 
)
overridevirtual

Prim Factories Request to Allocate and Construct a new Rprim.

Parameters
typeIdthe type identifier of the prim to allocate
rprimIda unique identifier for the prim
Returns
A pointer to the new prim or nullptr on error.

Implements HdRenderDelegate.

HDST_API HdSprim* HdStRenderDelegate::CreateSprim ( TfToken const typeId,
SdfPath const sprimId 
)
overridevirtual

Request to Allocate and Construct a new Sprim.

Parameters
typeIdthe type identifier of the prim to allocate
sprimIda unique identifier for the prim
Returns
A pointer to the new prim or nullptr on error.

Implements HdRenderDelegate.

HDST_API void HdStRenderDelegate::DestroyBprim ( HdBprim bprim)
overridevirtual

Request to Destruct and deallocate the prim.

Implements HdRenderDelegate.

HDST_API void HdStRenderDelegate::DestroyInstancer ( HdInstancer instancer)
overridevirtual

Implements HdRenderDelegate.

HDST_API void HdStRenderDelegate::DestroyRprim ( HdRprim rPrim)
overridevirtual

Request to Destruct and deallocate the prim.

Implements HdRenderDelegate.

HDST_API void HdStRenderDelegate::DestroySprim ( HdSprim sprim)
overridevirtual

Request to Destruct and deallocate the prim.

Implements HdRenderDelegate.

HDST_API HdAovDescriptor HdStRenderDelegate::GetDefaultAovDescriptor ( TfToken const name) const
overridevirtual

AOVs Returns a default AOV descriptor for the given named AOV, specifying things like preferred format.

Reimplemented from HdRenderDelegate.

HDST_API HdStDrawItemsCachePtr HdStRenderDelegate::GetDrawItemsCache ( ) const
HDST_API Hgi* HdStRenderDelegate::GetHgi ( )
HDST_API TfTokenVector HdStRenderDelegate::GetMaterialRenderContexts ( ) const
overridevirtual

Returns a list, in descending order of preference, that can be used to select among multiple material network implementations. The default list contains an empty token.

Reimplemented from HdRenderDelegate.

HDST_API HdRenderParam* HdStRenderDelegate::GetRenderParam ( ) const
overridevirtual

Returns an opaque handle to a render param, that in turn is passed to each prim created by the render delegate during sync processing. This avoids the need to store a global state pointer in each prim.

The typical lifetime of the renderParam would match that of the RenderDelegate, however the minimal lifetime is that of the Sync processing. The param maybe queried multiple times during sync.

A render delegate may return null for the param.

Reimplemented from HdRenderDelegate.

HDST_API HdRenderSettingDescriptorList HdStRenderDelegate::GetRenderSettingDescriptors ( ) const
overridevirtual

Get the backend-exported render setting descriptors.

Reimplemented from HdRenderDelegate.

HDST_API VtDictionary HdStRenderDelegate::GetRenderStats ( ) const
overridevirtual

Returns an open-format dictionary of render statistics

Reimplemented from HdRenderDelegate.

HDST_API HdResourceRegistrySharedPtr HdStRenderDelegate::GetResourceRegistry ( ) const
overridevirtual

Returns a shared ptr to the resource registry of the current render delegate.

Implements HdRenderDelegate.

HDST_API TfTokenVector HdStRenderDelegate::GetShaderSourceTypes ( ) const
overridevirtual

Returns the ordered list of shader source types that the render delegate supports.

Reimplemented from HdRenderDelegate.

HDST_API const TfTokenVector& HdStRenderDelegate::GetSupportedBprimTypes ( ) const
overridevirtual

Returns a list of typeId's of all supported Bprims by this render delegate.

Implements HdRenderDelegate.

HDST_API const TfTokenVector& HdStRenderDelegate::GetSupportedRprimTypes ( ) const
overridevirtual

Returns a list of typeId's of all supported Rprims by this render delegate.

Implements HdRenderDelegate.

HDST_API const TfTokenVector& HdStRenderDelegate::GetSupportedSprimTypes ( ) const
overridevirtual

Returns a list of typeId's of all supported Sprims by this render delegate.

Implements HdRenderDelegate.

HDST_API bool HdStRenderDelegate::IsPrimvarFilteringNeeded ( ) const
overridevirtual

Return true to indicate that the render delegate wants rprim primvars to be filtered by the scene delegate to reduce the amount of primvars that are send to the render delegate. For example the scene delegate may check the bound material primvar requirements and send only those to the render delegate. Return false to not apply primvar filtering in the scene delegate. Defaults to false.

Reimplemented from HdRenderDelegate.

static HDST_API bool HdStRenderDelegate::IsSupported ( )
static
HDST_API void HdStRenderDelegate::SetDrivers ( HdDriverVector const drivers)
overridevirtual

Set list of driver objects, such as a rendering context / devices. This is automatically called from HdRenderIndex when a HdDriver is provided during its construction. Default implementation does nothing.

Reimplemented from HdRenderDelegate.


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