Kanzi 4.1.0
kanzi::PipelineStateConcept Class Reference

PipelineStateConcept is a mixin that provides graphics pipeline state properties and helpers for applying them to the renderer. More...

#include <kanzi/core.ui/graphics3d/pipeline_state_concept.hpp>

Inheritance diagram for kanzi::PipelineStateConcept:
[legend]

Classes

struct  PushState
 Contains a record of applied composition state. More...
 

Public Types

enum  ViewportMode { ViewportModeAbsolute , ViewportModeRelative }
 Viewport mode enumeration. More...
 

Static Public Member Functions

static CompositionRequirements getStateCompositionRequirements (const PropertyObject &host)
 Compute additional composition requirements implied by the pipeline state properties on host (depth/stencil requirements).
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
static void popState (Renderer &renderer, PushState state)
 Pop the pipeline state for the given push state.
 
static PushState pushState (const PropertyObject &host, Renderer &renderer)
 Push the pipeline state based on the current property values of host.
 

Static Public Attributes

Properties
static PropertyType< intBlendModeProperty
 Blend mode property. Overrides the blend mode set in each rendered node.
 
static PropertyType< gfx::ColorWriteMaskColorWriteModeProperty
 Color write mode property.
 
static PropertyType< boolAlphaToCoverageEnabledProperty
 Alpha-to-coverage enabled property.
 
static PropertyType< GraphicsCompareFunctionDepthTestFunctionProperty
 Depth test function property.
 
static PropertyType< boolDepthWriteEnabledProperty
 Depth write enabled property.
 
static PropertyType< GraphicsCompareFunctionStencilTestFunctionProperty
 Stencil test function property.
 
static PropertyType< intStencilReferenceValueProperty
 Stencil reference value property.
 
static PropertyType< intStencilMaskProperty
 Stencil mask property.
 
static PropertyType< GraphicsStencilOperationStencilFailOperationProperty
 Stencil fail operation property.
 
static PropertyType< GraphicsStencilOperationStencilPassDepthFailOperationProperty
 Stencil pass depth fail operation property.
 
static PropertyType< GraphicsStencilOperationStencilPassDepthPassOperationProperty
 Stencil pass depth pass operation property.
 
static PropertyType< boolStencilWriteEnabledProperty
 Stencil write enabled property.
 
static PropertyType< GraphicsCullModeCullModeProperty
 Cull mode property.
 
static PropertyType< Vector4ViewportProperty
 Viewport property.
 
static PropertyType< ViewportModeViewportModeProperty
 Viewport mode property. Selects absolute or relative coordinates for ViewportProperty.
 
static PropertyType< Vector4ScissorProperty
 Scissor property. Scissor test within the current viewport.
 
static PropertyType< ViewportModeScissorModeProperty
 Scissor mode property. Selects absolute or relative coordinates for ScissorProperty.
 
static PropertyType< Vector2PolygonDepthOffsetProperty
 Polygon depth offset property.
 

Static Protected Member Functions

static bool pushColorBlend (const PropertyObject &host, CompositionStack &compositionStack)
 Push the color or blend state into the composition stack.
 
static bool pushDepthStencil (const PropertyObject &host, CompositionStack &compositionStack)
 Push the depth or stencil state into the composition stack.
 
static bool pushRasterization (const PropertyObject &host, CompositionStack &compositionStack)
 Push the rasterization state into the composition stack.
 
static bool pushViewportScissor (const PropertyObject &host, CompositionStack &compositionStack)
 Push the viewport and scissor state into the composition stack.
 

Detailed Description

PipelineStateConcept is a mixin that provides graphics pipeline state properties and helpers for applying them to the renderer.

This mixin is shared by render pass classes that need to apply pipeline state changes.

The property identifiers remain prefixed with "PipelineStateRenderPass.*" for backward compatibility with existing KZB content.

Since
Kanzi 4.1.0

Member Enumeration Documentation

◆ ViewportMode

Viewport mode enumeration.

Enumerator
ViewportModeAbsolute 

Absolute viewport - pixel coordinates.

ViewportModeRelative 

Relative viewport - percentage of current render context size.

Member Function Documentation

◆ makeEditorInfo()

static PropertyTypeEditorInfoSharedPtr kanzi::PipelineStateConcept::makeEditorInfo ( )
static

◆ pushState()

static PushState kanzi::PipelineStateConcept::pushState ( const PropertyObject & host,
Renderer & renderer )
static

Push the pipeline state based on the current property values of host.

Parameters
hostThe object that hosts the state properties. Must also expose RenderPass::InputViewportAreaProperty for viewport/scissor calculation.
rendererThe renderer.
Returns
The record of pushed state that can later be passed to popState().

◆ popState()

static void kanzi::PipelineStateConcept::popState ( Renderer & renderer,
PushState state )
static

Pop the pipeline state for the given push state.

Parameters
rendererThe renderer.
stateThe push state record returned by pushState().

◆ getStateCompositionRequirements()

static CompositionRequirements kanzi::PipelineStateConcept::getStateCompositionRequirements ( const PropertyObject & host)
static

Compute additional composition requirements implied by the pipeline state properties on host (depth/stencil requirements).

Parameters
hostThe object to read properties from.
Returns
The composition requirements implied by pipeline state properties.

◆ pushColorBlend()

static bool kanzi::PipelineStateConcept::pushColorBlend ( const PropertyObject & host,
CompositionStack & compositionStack )
staticprotected

Push the color or blend state into the composition stack.

Returns
True if state was pushed.

◆ pushDepthStencil()

static bool kanzi::PipelineStateConcept::pushDepthStencil ( const PropertyObject & host,
CompositionStack & compositionStack )
staticprotected

Push the depth or stencil state into the composition stack.

Returns
True if state was pushed.

◆ pushRasterization()

static bool kanzi::PipelineStateConcept::pushRasterization ( const PropertyObject & host,
CompositionStack & compositionStack )
staticprotected

Push the rasterization state into the composition stack.

Returns
True if state was pushed.

◆ pushViewportScissor()

static bool kanzi::PipelineStateConcept::pushViewportScissor ( const PropertyObject & host,
CompositionStack & compositionStack )
staticprotected

Push the viewport and scissor state into the composition stack.

Reads RenderPass::InputViewportAreaProperty from host to resolve relative coordinates.

Returns
True if state was pushed.

Member Data Documentation

◆ BlendModeProperty

PropertyType<int> kanzi::PipelineStateConcept::BlendModeProperty
static

Blend mode property. Overrides the blend mode set in each rendered node.

◆ ColorWriteModeProperty

PropertyType<gfx::ColorWriteMask> kanzi::PipelineStateConcept::ColorWriteModeProperty
static

Color write mode property.

Which channels the render pass writes to the color buffer.

Since
Kanzi 4.1.0 type changed from GraphicsColorWriteMode to gfx::ColorWriteMask.

◆ AlphaToCoverageEnabledProperty

PropertyType<bool> kanzi::PipelineStateConcept::AlphaToCoverageEnabledProperty
static

Alpha-to-coverage enabled property.

◆ DepthTestFunctionProperty

PropertyType<GraphicsCompareFunction> kanzi::PipelineStateConcept::DepthTestFunctionProperty
static

Depth test function property.

◆ DepthWriteEnabledProperty

PropertyType<bool> kanzi::PipelineStateConcept::DepthWriteEnabledProperty
static

Depth write enabled property.

◆ StencilTestFunctionProperty

PropertyType<GraphicsCompareFunction> kanzi::PipelineStateConcept::StencilTestFunctionProperty
static

Stencil test function property.

◆ StencilReferenceValueProperty

PropertyType<int> kanzi::PipelineStateConcept::StencilReferenceValueProperty
static

Stencil reference value property.

◆ StencilMaskProperty

PropertyType<int> kanzi::PipelineStateConcept::StencilMaskProperty
static

Stencil mask property.

◆ StencilFailOperationProperty

PropertyType<GraphicsStencilOperation> kanzi::PipelineStateConcept::StencilFailOperationProperty
static

Stencil fail operation property.

◆ StencilPassDepthFailOperationProperty

PropertyType<GraphicsStencilOperation> kanzi::PipelineStateConcept::StencilPassDepthFailOperationProperty
static

Stencil pass depth fail operation property.

◆ StencilPassDepthPassOperationProperty

PropertyType<GraphicsStencilOperation> kanzi::PipelineStateConcept::StencilPassDepthPassOperationProperty
static

Stencil pass depth pass operation property.

◆ StencilWriteEnabledProperty

PropertyType<bool> kanzi::PipelineStateConcept::StencilWriteEnabledProperty
static

Stencil write enabled property.

◆ CullModeProperty

PropertyType<GraphicsCullMode> kanzi::PipelineStateConcept::CullModeProperty
static

Cull mode property.

◆ ViewportProperty

PropertyType<Vector4> kanzi::PipelineStateConcept::ViewportProperty
static

Viewport property.

Modifies the current rendering viewport. Coordinates are absolute or relative based on ViewportModeProperty.

◆ ViewportModeProperty

PropertyType<ViewportMode> kanzi::PipelineStateConcept::ViewportModeProperty
static

Viewport mode property. Selects absolute or relative coordinates for ViewportProperty.

◆ ScissorProperty

PropertyType<Vector4> kanzi::PipelineStateConcept::ScissorProperty
static

Scissor property. Scissor test within the current viewport.

◆ ScissorModeProperty

PropertyType<ViewportMode> kanzi::PipelineStateConcept::ScissorModeProperty
static

Scissor mode property. Selects absolute or relative coordinates for ScissorProperty.

◆ PolygonDepthOffsetProperty

PropertyType<Vector2> kanzi::PipelineStateConcept::PolygonDepthOffsetProperty
static

Polygon depth offset property.


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