All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdRenderPassState Class Reference

A set of rendering parameters used among render passes. More...

+ Inheritance diagram for HdRenderPassState:

Public Member Functions

virtual HD_API void Prepare (HdResourceRegistrySharedPtr const &resourceRegistry)
 Schedule to update renderPassState parameters. More...
 
virtual HD_API void Bind ()
 
virtual HD_API void Unbind ()
 
Application rendering state
HD_API void SetOverrideColor (GfVec4f const &color)
 Set an override color for rendering where the R, G and B components are the color and the alpha component is the blend value. More...
 
const GfVec4fGetOverrideColor () const
 
HD_API void SetWireframeColor (GfVec4f const &color)
 Set a wireframe color for rendering where the R, G and B components are the color and the alpha component is the blend value. More...
 
const GfVec4fGetWireframeColor () const
 
HD_API void SetMaskColor (GfVec4f const &color)
 
const GfVec4fGetMaskColor () const
 
HD_API void SetIndicatorColor (GfVec4f const &color)
 
const GfVec4fGetIndicatorColor () const
 
HD_API void SetPointColor (GfVec4f const &color)
 Set a point color for rendering where the R, G and B components are the color and the alpha component is the blend value. More...
 
const GfVec4fGetPointColor () const
 
HD_API void SetPointSize (float size)
 Set the point size for unselected points. More...
 
float GetPointSize () const
 
HD_API void SetPointSelectedSize (float size)
 Set the point size for selected points. More...
 
float GetPointSelectedSize () const
 
HD_API void SetLightingEnabled (bool enabled)
 XXX: Hacky way of disabling lighting. More...
 
bool GetLightingEnabled () const
 

Camera and framing state

typedef std::vector< GfVec4dClipPlanesVector
 
HD_API void SetCameraFramingState (GfMatrix4d const &worldToViewMatrix, GfMatrix4d const &projectionMatrix, GfVec4d const &viewport, ClipPlanesVector const &clipPlanes)
 Camera setter API Option 1: Specify matrices, viewport and clipping planes (defined in camera space) directly. More...
 
HD_API void SetCameraAndViewport (HdCamera const *camera, GfVec4d const &viewport)
 Option 2: Set camera handle and viewport to use. More...
 
HD_API GfMatrix4d const & GetWorldToViewMatrix () const
 Camera getter API. More...
 
HD_API GfMatrix4d GetProjectionMatrix () const
 
GfVec4f const & GetViewport () const
 
HD_API ClipPlanesVector const & GetClipPlanes () const
 
GfMatrix4d GetCullMatrix () const
 
HdCamera const * GetCamera () const
 

Render pipeline state

enum  ColorMask { ColorMaskNone, ColorMaskRGB, ColorMaskRGBA }
 
HdCamera const * _camera
 
GfVec4f _viewport
 
GfMatrix4d _cullMatrix
 
GfMatrix4d _worldToViewMatrix
 
GfMatrix4d _projectionMatrix
 
ClipPlanesVector _clipPlanes
 
GfVec4f _overrideColor
 
GfVec4f _wireframeColor
 
GfVec4f _maskColor
 
GfVec4f _indicatorColor
 
GfVec4f _pointColor
 
float _pointSize
 
float _pointSelectedSize
 
bool _lightingEnabled
 
float _alphaThreshold
 
float _tessLevel
 
GfVec2f _drawRange
 
bool _depthBiasUseDefault
 
bool _depthBiasEnabled
 
float _depthBiasConstantFactor
 
float _depthBiasSlopeFactor
 
HdCompareFunction _depthFunc
 
bool _depthMaskEnabled
 
HdCullStyle _cullStyle
 
HdCompareFunction _stencilFunc
 
int _stencilRef
 
int _stencilMask
 
HdStencilOp _stencilFailOp
 
HdStencilOp _stencilZFailOp
 
HdStencilOp _stencilZPassOp
 
bool _stencilEnabled
 
float _lineWidth
 
HdBlendOp _blendColorOp
 
HdBlendFactor _blendColorSrcFactor
 
HdBlendFactor _blendColorDstFactor
 
HdBlendOp _blendAlphaOp
 
HdBlendFactor _blendAlphaSrcFactor
 
HdBlendFactor _blendAlphaDstFactor
 
GfVec4f _blendConstantColor
 
bool _blendEnabled
 
bool _alphaToCoverageUseDefault
 
bool _alphaToCoverageEnabled
 
bool _colorMaskUseDefault
 
ColorMask _colorMask
 
HdRenderPassAovBindingVector _aovBindings
 
HD_API void SetAovBindings (HdRenderPassAovBindingVector const &aovBindings)
 Set the attachments for this renderpass to render into. More...
 
HD_API
HdRenderPassAovBindingVector
const & 
GetAovBindings () const
 
HD_API void SetCullStyle (HdCullStyle cullStyle)
 
HD_API HdCullStyle GetCullStyle ()
 
HD_API void SetAlphaThreshold (float alphaThreshold)
 
float GetAlphaThreshold () const
 
HD_API void SetTessLevel (float level)
 
float GetTessLevel () const
 
HD_API void SetDrawingRange (GfVec2f const &drawRange)
 
GfVec2f GetDrawingRange () const
 
GfVec2f GetDrawingRangeNDC () const
 
HD_API void SetDepthBiasUseDefault (bool useDefault)
 
bool GetDepthBiasUseDefault () const
 
HD_API void SetDepthBiasEnabled (bool enabled)
 
bool GetDepthBiasEnabled () const
 
HD_API void SetDepthBias (float constantFactor, float slopeFactor)
 
HD_API void SetDepthFunc (HdCompareFunction depthFunc)
 
HdCompareFunction GetDepthFunc () const
 
HD_API void SetEnableDepthMask (bool state)
 
HD_API bool GetEnableDepthMask ()
 
HD_API void SetStencil (HdCompareFunction func, int ref, int mask, HdStencilOp fail, HdStencilOp zfail, HdStencilOp zpass)
 
HdCompareFunction GetStencilFunc () const
 
int GetStencilRef () const
 
int GetStencilMask () const
 
HdStencilOp GetStencilFailOp () const
 
HdStencilOp GetStencilDepthFailOp () const
 
HdStencilOp GetStencilDepthPassOp () const
 
HD_API void SetStencilEnabled (bool enabled)
 
HD_API void SetLineWidth (float width)
 
float GetLineWidth () const
 
HD_API void SetBlend (HdBlendOp colorOp, HdBlendFactor colorSrcFactor, HdBlendFactor colorDstFactor, HdBlendOp alphaOp, HdBlendFactor alphaSrcFactor, HdBlendFactor alphaDstFactor)
 
HdBlendOp GetBlendColorOp ()
 
HdBlendFactor GetBlendColorSrcFactor ()
 
HdBlendFactor GetBlendColorDstFactor ()
 
HdBlendOp GetBlendAlphaOp ()
 
HdBlendFactor GetBlendAlphaSrcFactor ()
 
HdBlendFactor GetBlendAlphaDstFactor ()
 
HD_API void SetBlendConstantColor (GfVec4f const &color)
 
const GfVec4fGetBlendConstantColor () const
 
HD_API void SetBlendEnabled (bool enabled)
 
HD_API void SetAlphaToCoverageUseDefault (bool useDefault)
 
bool GetAlphaToCoverageUseDefault () const
 
HD_API void SetAlphaToCoverageEnabled (bool enabled)
 
bool GetAlphaToCoverageEnabled () const
 
HD_API void SetColorMaskUseDefault (bool useDefault)
 
bool GetColorMaskUseDefault () const
 
HD_API void SetColorMask (ColorMask const &mask)
 
ColorMask GetColorMask () const
 

Detailed Description

A set of rendering parameters used among render passes.

Parameters are expressed as GL states, uniforms or shaders.

Definition at line 57 of file renderPassState.h.

Member Function Documentation

HD_API GfMatrix4d const& GetWorldToViewMatrix ( ) const

Camera getter API.

virtual HD_API void Prepare ( HdResourceRegistrySharedPtr const &  resourceRegistry)
virtual

Schedule to update renderPassState parameters.

e.g. camera matrix, override color, id blend factor. Prepare, called once per frame after the sync phase, but prior to the commit phase.

Reimplemented in HdStRenderPassState.

HD_API void SetAovBindings ( HdRenderPassAovBindingVector const &  aovBindings)

Set the attachments for this renderpass to render into.

HD_API void SetCameraAndViewport ( HdCamera const *  camera,
GfVec4d const &  viewport 
)

Option 2: Set camera handle and viewport to use.

The view, projection and clipping plane info of the camera will be used.

HD_API void SetCameraFramingState ( GfMatrix4d const &  worldToViewMatrix,
GfMatrix4d const &  projectionMatrix,
GfVec4d const &  viewport,
ClipPlanesVector const &  clipPlanes 
)

Camera setter API Option 1: Specify matrices, viewport and clipping planes (defined in camera space) directly.

HD_API void SetLightingEnabled ( bool  enabled)

XXX: Hacky way of disabling lighting.

HD_API void SetOverrideColor ( GfVec4f const &  color)

Set an override color for rendering where the R, G and B components are the color and the alpha component is the blend value.

HD_API void SetPointColor ( GfVec4f const &  color)

Set a point color for rendering where the R, G and B components are the color and the alpha component is the blend value.

HD_API void SetPointSelectedSize ( float  size)

Set the point size for selected points.

HD_API void SetPointSize ( float  size)

Set the point size for unselected points.

HD_API void SetWireframeColor ( GfVec4f const &  color)

Set a wireframe color for rendering where the R, G and B components are the color and the alpha component is the blend value.


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