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

#include <renderPassState.h>

+ Inheritance diagram for HdStRenderPassState:

Public Member Functions

HDST_API HdStRenderPassState ()
 
HDST_API HdStRenderPassState (HdStRenderPassShaderSharedPtr const &shader)
 
HDST_API ~HdStRenderPassState () override
 
HDST_API void Prepare (HdResourceRegistrySharedPtr const &resourceRegistry) override
 
HDST_API void Bind () override
 
HDST_API void Unbind () override
 
HDST_API void SetLightingShader (HdStLightingShaderSharedPtr const &lightingShader)
 Set lighting shader. More...
 
HdStLightingShaderSharedPtr constGetLightingShader () const
 
HDST_API void SetRenderPassShader (HdStRenderPassShaderSharedPtr const &renderPassShader)
 renderpass shader More...
 
HdStRenderPassShaderSharedPtr
const
GetRenderPassShader () const
 
HDST_API void SetOverrideShader (HdStShaderCodeSharedPtr const &overrideShader)
 override shader More...
 
HdStShaderCodeSharedPtr constGetOverrideShader () const
 
HDST_API
HdStShaderCodeSharedPtrVector 
GetShaders () const
 returns shaders (lighting/renderpass) More...
 
HDST_API size_t GetShaderHash () const
 
HDST_API HgiGraphicsCmdsDesc MakeGraphicsCmdsDesc (const HdRenderIndex *) const
 
- Public Member Functions inherited from HdRenderPassState
HD_API HdRenderPassState ()
 
virtual HD_API ~HdRenderPassState ()
 
HD_API void SetOverrideColor (GfVec4f const &color)
 
const GfVec4fGetOverrideColor () const
 
HD_API void SetWireframeColor (GfVec4f const &color)
 
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)
 
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
 
HD_API void SetCameraFramingState (GfMatrix4d const &worldToViewMatrix, GfMatrix4d const &projectionMatrix, GfVec4d const &viewport, ClipPlanesVector const &clipPlanes)
 
HD_API void SetCameraAndViewport (HdCamera const *camera, GfVec4d const &viewport)
 
HD_API GfMatrix4d constGetWorldToViewMatrix () const
 Camera getter API. More...
 
HD_API GfMatrix4d GetProjectionMatrix () const
 
GfVec4f constGetViewport () const
 
HD_API ClipPlanesVector constGetClipPlanes () const
 
GfMatrix4d GetCullMatrix () const
 
HdCamera constGetCamera () const
 
HD_API void SetAovBindings (HdRenderPassAovBindingVector const &aovBindings)
 Set the attachments for this renderpass to render into. More...
 
HD_API
HdRenderPassAovBindingVector
const
GetAovBindings () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetUseAovMultiSample (bool state)
 
HD_API bool GetUseAovMultiSample () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetCullStyle (HdCullStyle cullStyle)
 Set the attachments for this renderpass to render into. More...
 
HD_API HdCullStyle GetCullStyle ()
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetAlphaThreshold (float alphaThreshold)
 Set the attachments for this renderpass to render into. More...
 
float GetAlphaThreshold () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetTessLevel (float level)
 Set the attachments for this renderpass to render into. More...
 
float GetTessLevel () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetDrawingRange (GfVec2f const &drawRange)
 Set the attachments for this renderpass to render into. More...
 
GfVec2f GetDrawingRange () const
 Set the attachments for this renderpass to render into. More...
 
GfVec2f GetDrawingRangeNDC () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetDepthBiasUseDefault (bool useDefault)
 Set the attachments for this renderpass to render into. More...
 
bool GetDepthBiasUseDefault () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetDepthBiasEnabled (bool enabled)
 Set the attachments for this renderpass to render into. More...
 
bool GetDepthBiasEnabled () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetDepthBias (float constantFactor, float slopeFactor)
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetDepthFunc (HdCompareFunction depthFunc)
 Set the attachments for this renderpass to render into. More...
 
HdCompareFunction GetDepthFunc () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetEnableDepthMask (bool state)
 Set the attachments for this renderpass to render into. More...
 
HD_API bool GetEnableDepthMask ()
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetStencil (HdCompareFunction func, int ref, int mask, HdStencilOp fail, HdStencilOp zfail, HdStencilOp zpass)
 Set the attachments for this renderpass to render into. More...
 
HdCompareFunction GetStencilFunc () const
 Set the attachments for this renderpass to render into. More...
 
int GetStencilRef () const
 Set the attachments for this renderpass to render into. More...
 
int GetStencilMask () const
 Set the attachments for this renderpass to render into. More...
 
HdStencilOp GetStencilFailOp () const
 Set the attachments for this renderpass to render into. More...
 
HdStencilOp GetStencilDepthFailOp () const
 Set the attachments for this renderpass to render into. More...
 
HdStencilOp GetStencilDepthPassOp () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetStencilEnabled (bool enabled)
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetLineWidth (float width)
 Set the attachments for this renderpass to render into. More...
 
float GetLineWidth () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetBlend (HdBlendOp colorOp, HdBlendFactor colorSrcFactor, HdBlendFactor colorDstFactor, HdBlendOp alphaOp, HdBlendFactor alphaSrcFactor, HdBlendFactor alphaDstFactor)
 Set the attachments for this renderpass to render into. More...
 
HdBlendOp GetBlendColorOp ()
 Set the attachments for this renderpass to render into. More...
 
HdBlendFactor GetBlendColorSrcFactor ()
 Set the attachments for this renderpass to render into. More...
 
HdBlendFactor GetBlendColorDstFactor ()
 Set the attachments for this renderpass to render into. More...
 
HdBlendOp GetBlendAlphaOp ()
 Set the attachments for this renderpass to render into. More...
 
HdBlendFactor GetBlendAlphaSrcFactor ()
 Set the attachments for this renderpass to render into. More...
 
HdBlendFactor GetBlendAlphaDstFactor ()
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetBlendConstantColor (GfVec4f const &color)
 Set the attachments for this renderpass to render into. More...
 
const GfVec4fGetBlendConstantColor () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetBlendEnabled (bool enabled)
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetAlphaToCoverageUseDefault (bool useDefault)
 Set the attachments for this renderpass to render into. More...
 
bool GetAlphaToCoverageUseDefault () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetAlphaToCoverageEnabled (bool enabled)
 Set the attachments for this renderpass to render into. More...
 
bool GetAlphaToCoverageEnabled () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetColorMaskUseDefault (bool useDefault)
 Set the attachments for this renderpass to render into. More...
 
bool GetColorMaskUseDefault () const
 Set the attachments for this renderpass to render into. More...
 
HD_API void SetColorMask (ColorMask const &mask)
 Set the attachments for this renderpass to render into. More...
 
ColorMask GetColorMask () const
 Set the attachments for this renderpass to render into. More...
 

Detailed Description

A set of rendering parameters used among render passes.

Parameters are expressed as GL states, uniforms or shaders.

Definition at line 56 of file renderPassState.h.

Constructor & Destructor Documentation

HDST_API HdStRenderPassState::HdStRenderPassState ( )
HDST_API HdStRenderPassState::HdStRenderPassState ( HdStRenderPassShaderSharedPtr const shader)
HDST_API HdStRenderPassState::~HdStRenderPassState ( )
override

Member Function Documentation

HDST_API void HdStRenderPassState::Bind ( )
overridevirtual

Apply the GL states. Following states may be changed and restored to the GL default at Unbind(). glEnable(GL_POLYGON_OFFSET_FILL) glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE) glEnable(GL_PROGRAM_POINT_SIZE); glEnable(GL_STENCIL_TEST); glPolygonOffset() glDepthFunc() glStencilFunc() glStencilOp() glLineWidth()

Reimplemented from HdRenderPassState.

HdStLightingShaderSharedPtr const& HdStRenderPassState::GetLightingShader ( ) const
inline

Definition at line 91 of file renderPassState.h.

HdStShaderCodeSharedPtr const& HdStRenderPassState::GetOverrideShader ( ) const
inline

Definition at line 105 of file renderPassState.h.

HdStRenderPassShaderSharedPtr const& HdStRenderPassState::GetRenderPassShader ( ) const
inline

Definition at line 98 of file renderPassState.h.

HDST_API size_t HdStRenderPassState::GetShaderHash ( ) const
HDST_API HdStShaderCodeSharedPtrVector HdStRenderPassState::GetShaders ( ) const

returns shaders (lighting/renderpass)

HDST_API HgiGraphicsCmdsDesc HdStRenderPassState::MakeGraphicsCmdsDesc ( const HdRenderIndex ) const
HDST_API void HdStRenderPassState::Prepare ( HdResourceRegistrySharedPtr const resourceRegistry)
overridevirtual

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 from HdRenderPassState.

HDST_API void HdStRenderPassState::SetLightingShader ( HdStLightingShaderSharedPtr const lightingShader)

Set lighting shader.

HDST_API void HdStRenderPassState::SetOverrideShader ( HdStShaderCodeSharedPtr const overrideShader)

override shader

HDST_API void HdStRenderPassState::SetRenderPassShader ( HdStRenderPassShaderSharedPtr const renderPassShader)

renderpass shader

HDST_API void HdStRenderPassState::Unbind ( )
overridevirtual

Reimplemented from HdRenderPassState.


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