Home -> IStateGroupNode
Declaration
class IStateGroupNode :public IStateContainer;Description
The IStateGroupNode interface represents a node under an IProgramNode node in the render scene tree. This node is the primary node that is responsible for defining state settings during the rendering process. State settings applied on this node will be inherited and used by the contained IRenderableNode child nodes. Some settings such as blend state can only be defined on this node. Other state values, such as shader resource bindings and shader state settings, can also be set on child IRenderableNode objects. In this case, the child node values override the inherited values from a parent IStateGroupNode node for that object. Setting state on IStateGroupNode objects allows state values to be set once and shared by a set of individual objects, which is easier to manage, and slightly more efficient during rendering.
Important
Note that as IStateGroupNode objects cannot be nested within themselves, only one level of grouping is allowed for sharing state settings.
Warning
Unlike other nodes in the render tree, the IStateGroupNode does not guarantee all child IRenderableNode entries will be drawn in the order they are added. In order to minimize expensive pipeline state changes, renderer plugins will group child nodes into sets that can be drawn with the same pipeline state object. If you need to perform strictly ordered rendering tasks where each child IRenderableNode node is drawn in a particular order, such as if you have depth testing disabled, or are performing order-dependent transparency using blending operations, you must ensure all child IRenderableNode nodes use the same primitive mode, including whether primitive restart is enabled, as set by the SetPrimitiveMode method. Additionally, you must not enable instance rendering for any children using the the SetInstanceMode method. If you adhere to these requirements, strict ordering will be maintained, otherwise the order of rendering is undefined.
Enumerations
| Name | Description | |
|---|---|---|
| PolygonFillMode |
Specifies the available options for configuring the polygon fill mode, as set by the SetPolygonFillMode method.
|
|
| PolygonCullMode |
Specifies the available options for configuring the polygon cull mode, as set by the SetPolygonCullMode method.
|
|
| PolygonWindingOrder |
Specifies the available options for configuring the polygon winding order, as set by the SetPolygonWindingOrder method.
|
|
| DepthComparisonFunction |
Specifies the available depth comparison functions, as set by the SetDepthComparisonFunction method.
|
|
| StencilTargetFace |
Specifies the available target faces for stencil operations, as used by the SetStencilOperation method.
|
|
| StencilComparisonFunction |
Specifies the available stencil comparison functions, as set by the SetStencilOperation method.
|
|
| StencilOperation |
Specifies the available stencil operations, as set by the SetStencilOperation method.
|
|
| BlendOperation |
Specifies the available blend operations, as set by the SetBlendMode method.
|
|
| BlendFactor |
Specifies the available blend factors, as set by the SetBlendMode method.
|
Members
Initialization methods
| Name | Description | |
|---|---|---|
| Delete |
Schedules the object for deletion. After calling this method, the object will be destroyed after the current
frame completes drawing.
|
Child node methods
| Name | Description | |
|---|---|---|
| AddChildNode |
Adds the specified IRenderableNode as a child of this node
|
|
| AddChildNodes |
Adds the specified set of IRenderableNode
objects as children of this node
|
|
| RemoveChildNode |
Removes the specified IRenderableNode as a child of this node
|
|
| RemoveChildNodes |
Removes the specified set of IRenderableNode
objects as children of this node
|
|
| RemoveAllChildNodes |
Removes all current IRenderableNode child nodes
|
|
| SetChildNodes |
Sets the specified set of IRenderableNode
objects as children of this node, removing any existing child nodes which may have been previously added.
|
Compute methods
| Name | Description | |
|---|---|---|
| SetComputeTask |
Defines a compute task to execute for this node. No child nodes or rendering state settings are valid when a
compute task is defined, and the parent IShaderProgram node must define a compute shader.
|
|
| RemoveComputeTask |
Removes the previously set compute task for this node
|
Depth state methods
| Name | Description | |
|---|---|---|
| SetDepthTestEnabled |
Specifies whether fragments from rendered objects will be tested against the depth buffer
|
|
| SetDepthWriteEnabled |
Specifies whether rendered objects will update the depth buffer based on the generated fragment depth values
|
|
| SetDepthComparisonFunction |
Changes the comparison function used to perform depth testing
|
|
| SetDepthBias |
Configures depth bias to offset generated depth values
|
|
| ClearDepthBias |
Removes previously configured depth bias settings
|
Stencil state methods
| Name | Description | |
|---|---|---|
| SetStencilTestEnabled |
Specifies whether stencil testing will be active, and configures some settings related to stencil testing.
|
|
| SetStencilOperation |
Configures how stencil testing will be performed, and the actions which will be taken in response.
|
|
| SetStencilReferenceValue |
Sets the reference value which will be used when performing stencil testing
|
Rasterization state methods
| Name | Description | |
|---|---|---|
| SetPolygonFillMode |
Configures the fill mode for polygons, IE, whether they are drawn as lines or filled triangles.
|
|
| SetPolygonCullMode |
Configures polygon culling, such as whether backface culling is enabled.
|
|
| SetPolygonWindingOrder |
Specifies the vertex winding order, in order to determine the front and back of polygons.
|
Blend state methods
| Name | Description | |
|---|---|---|
| SetBlendEnabled |
Specifies whether blending is enabled for rendered objects
|
|
| SetBlendMode |
Configures the blend mode settings to use if blending is enabled
|
Resource binding methods (Inherited from IStateContainer)
| Name | Description | |
|---|---|---|
| BindTextureWithCombinedSampler |
Creates a texture resource binding with a combined image sampler for the current shader program
|
|
| BindTexture |
Creates a texture resource binding for the current shader program
|
|
| UnbindTexture |
Removes a previously established texture resource binding, with or without a combined image sampler.
|
|
| BindSampler |
Creates a sampler resource binding for the current shader program
|
|
| UnbindSampler |
Removes a previously established sampler binding for the current shader program
|
|
| BindStateBuffer |
Creates a state buffer resource binding for the current shader program
|
|
| UnbindStateBuffer |
Removes a previously established state buffer binding for the current shader program
|
|
| BindResourceArray |
Creates a resource array binding for the current shader program
|
|
| UnbindResourceArray |
Removes a previously established resource array binding for the current shader program
|
State value methods (Inherited from IStateContainer)
| Name | Description | |
|---|---|---|
| SetStateValue |
Sets the current target shader state variable to the specified value for this node and any child nodes
|
|
| ResetStateValue |
Restores the target shader state variable to its default or inherited value
|
Debug methods
| Name | Description | |
|---|---|---|
| SetDebugName |
Sets a debug name for this state group node, where supported by the renderer and native graphics API.
|