Loading...
Searching...
No Matches
HdRenderPass Class Referenceabstract

An abstract class representing a single render iteration over a set of prims (the HdRprimCollection), for the camera/viewport parameters in HdRenderPassState. More...

#include <renderPass.h>

+ Inheritance diagram for HdRenderPass:

Public Member Functions

HD_API HdRenderPass (HdRenderIndex *index, HdRprimCollection const &collection)
 
HdRprimCollection const & GetRprimCollection () const
 Returns the HdRprimCollection to be drawn by this RenderPass.
 
HD_API void SetRprimCollection (HdRprimCollection const &col)
 Sets the HdRprimCollection, note that this may invalidate internal caches used to accelerate drawing.
 
HdRenderIndexGetRenderIndex () const
 Return the render index.
 
Synchronization
HD_API void Sync ()
 Sync the render pass resources.
 
Execution
HD_API void Execute (HdRenderPassStateSharedPtr const &renderPassState, TfTokenVector const &renderTags)
 Execute a subset of buckets of this renderpass.
 

Optional API hooks for progressive rendering

virtual bool IsConverged () const
 
virtual void _Execute (HdRenderPassStateSharedPtr const &renderPassState, TfTokenVector const &renderTags)=0
 Virtual API: Execute the buckets corresponding to renderTags; renderTags.empty() implies execute everything.
 
virtual void _MarkCollectionDirty ()
 Optional API: let derived classes mark their collection tracking as dirty.
 
virtual void _Sync ()
 Optional API: let derived classes sync data.
 

Detailed Description

An abstract class representing a single render iteration over a set of prims (the HdRprimCollection), for the camera/viewport parameters in HdRenderPassState.

Conceptually, a rendering task may be broken down into one or more HdRenderPass(es).

An HdRenderPass has two phases, Sync() and Execute(), in line with Hydra's execution phases (See HdEngine::Execute)

The base class implementation of Sync() takes care of syncing collection changes with the HdRenderIndex via HdDirtyList, and allows derived classes to track collection changes (via _MarkCollectionDirty) and sync additional resources (via _Sync)

Renderer backends implement _Execute, wherein the HdDrawItem(s) for the collection may be consumed via HdRenderIndex::GetDrawItems. Typically, the HdRenderPassState argument of _Execute is made available via the HdTaskContext.

Note
Rendering backends are expected to specialize this abstract class, and return the specialized object via HdRenderDelegate::CreateRenderPass

Definition at line 69 of file renderPass.h.

Member Function Documentation

◆ _Execute()

virtual void _Execute ( HdRenderPassStateSharedPtr const &  renderPassState,
TfTokenVector const &  renderTags 
)
protectedpure virtual

Virtual API: Execute the buckets corresponding to renderTags; renderTags.empty() implies execute everything.

Implemented in HdEmbreeRenderPass.

◆ _MarkCollectionDirty()

virtual void _MarkCollectionDirty ( )
inlineprotectedvirtual

Optional API: let derived classes mark their collection tracking as dirty.

Reimplemented in HdEmbreeRenderPass.

Definition at line 118 of file renderPass.h.

◆ _Sync()

virtual void _Sync ( )
inlineprotectedvirtual

Optional API: let derived classes sync data.

Definition at line 121 of file renderPass.h.

◆ Execute()

HD_API void Execute ( HdRenderPassStateSharedPtr const &  renderPassState,
TfTokenVector const &  renderTags 
)

Execute a subset of buckets of this renderpass.

◆ GetRenderIndex()

HdRenderIndex * GetRenderIndex ( ) const
inline

Return the render index.

Definition at line 86 of file renderPass.h.

◆ GetRprimCollection()

HdRprimCollection const & GetRprimCollection ( ) const
inline

Returns the HdRprimCollection to be drawn by this RenderPass.

Definition at line 78 of file renderPass.h.

◆ IsConverged()

virtual bool IsConverged ( ) const
inlinevirtual

Reimplemented in HdEmbreeRenderPass.

Definition at line 109 of file renderPass.h.

◆ SetRprimCollection()

HD_API void SetRprimCollection ( HdRprimCollection const &  col)

Sets the HdRprimCollection, note that this may invalidate internal caches used to accelerate drawing.

◆ Sync()

HD_API void Sync ( )

Sync the render pass resources.


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