Home -> IProgramNode

Declaration

class IProgramNode;

Description

The IProgramNode interface represents a node under an IRenderPassNode node in the render scene tree. This node is responsible for specifying a shader program to load, which will be used as the active shader program for all child nodes during rendering operations. This node also allows shader constants to be specified, which for supported graphics APIs allow shader programs to use these values as known compile-time constants, to optimize or customize the shader program. This node contains IStateGroupNode objects as child nodes, which hold further state settings and content to use during rendering.

ImportantImportant

Although default state values can be set for an IProgramNode object at a higher level, by providing an IDefaultState object when the node is added as a child to an IRenderPassNode node, state values in an IDefaultState object cannot override constant state values which have been set through calls to SetConstantStateValue.

Members

Initialization methods

Name Description
Public member 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
Public member AddChildNode
Adds the specified IStateGroupNode as a child of this node
Public member AddChildNodes
Adds the specified set of IStateGroupNode objects as children of this node
Public member RemoveChildNode
Removes the specified IStateGroupNode as a child of this node
Public member RemoveChildNodes
Removes the specified set of IStateGroupNode objects as children of this node
Public member RemoveAllChildNodes
Removes all current IStateGroupNode child nodes
Public member SetChildNodes
Sets the specified set of IStateGroupNode objects as children of this node, removing any existing child nodes which may have been previously added.

Shader program methods

Name Description
Public member BindShaderProgram
Binds the specified IShaderProgram to this node

Constant state value methods

Name Description
Public member SetConstantStateValue
Sets the value of the specified shader constant
Public member ResetConstantStateValue
Restores the value of the specified shader constant to its default value

Debug methods

Name Description
Public member SetDebugName
Sets a debug name for this program node, where supported by the renderer and native graphics API.

See also