All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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...

+ 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. More...
 
HD_API void SetRprimCollection (HdRprimCollection const &col)
 Sets the HdRprimCollection, note that this may invalidate internal caches used to accelerate drawing. More...
 
HdDirtyListSharedPtr const & GetDirtyList () const
 Returns the dirty list (maintained in the change tracker) for efficient traversal. More...
 
HdRenderIndexGetRenderIndex () const
 Return the render index. More...
 
Synchronization
HD_API void Sync ()
 Sync the render pass resources. More...
 
Prepare
HD_API void Prepare (TfTokenVector const &renderTags)
 Prepare renderpass data. More...
 
Execution
HD_API void Execute (HdRenderPassStateSharedPtr const &renderPassState, TfTokenVector const &renderTags)
 Execute a subset of buckets of this renderpass. More...
 

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. More...
 
virtual void _MarkCollectionDirty ()
 Optional API: let derived classes mark their collection tracking as dirty. More...
 
virtual void _Sync ()
 Optional API: let derived classes sync data. More...
 
virtual void _Prepare (TfTokenVector const &renderTags)
 Optional API: let derived classes prepare data. More...
 

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 71 of file renderPass.h.

Member Function Documentation

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, HdPrman_RenderPass, and HdPrman_RenderPass.

virtual void _MarkCollectionDirty ( )
inlineprotectedvirtual

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

Reimplemented in HdEmbreeRenderPass.

Definition at line 134 of file renderPass.h.

virtual void _Prepare ( TfTokenVector const &  renderTags)
inlineprotectedvirtual

Optional API: let derived classes prepare data.

Definition at line 140 of file renderPass.h.

virtual void _Sync ( )
inlineprotectedvirtual

Optional API: let derived classes sync data.

Definition at line 137 of file renderPass.h.

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

Execute a subset of buckets of this renderpass.

HdDirtyListSharedPtr const& GetDirtyList ( ) const
inline

Returns the dirty list (maintained in the change tracker) for efficient traversal.

Definition at line 89 of file renderPass.h.

HdRenderIndex* GetRenderIndex ( ) const
inline

Return the render index.

Definition at line 94 of file renderPass.h.

HdRprimCollection const& GetRprimCollection ( ) const
inline

Returns the HdRprimCollection to be drawn by this RenderPass.

Definition at line 80 of file renderPass.h.

HD_API void Prepare ( TfTokenVector const &  renderTags)

Prepare renderpass data.

HD_API void SetRprimCollection ( HdRprimCollection const &  col)

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

HD_API void Sync ( )

Sync the render pass resources.


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