NAME
cgGetNextStateAssignment - iterate through state assignments in a pass
SYNOPSIS
#include <Cg/cg.h> CGstateassignment cgGetNextStateAssignment( CGstateassignment sa );PARAMETERS
- sa
The current state assignment.
RETURN VALUES
cgGetNextStateAssignment returns the next state assignment in the context's internal sequence of state assignments. It returns 0 when prog is the last state assignment in the context.
DESCRIPTION
The state assignments within a pass can be iterated over by using the cgGetNextStateAssignment function.
EXAMPLES
The following example code illustrates one way to do this:
CGstateassignment sa = cgGetFirstStateAssignment( pass ); while( sa ) { /* do something with sa */ sa = cgGetNextStateAssignment( sa ) }State assignments are returned in the same order specified in the pass in the effect.
ERRORS
CG_INVALID_STATE ASSIGNMENT_HANDLE_ERROR is generated if sa does not refer to a valid state assignment.
HISTORY
cgGetNextStateAssignment was introduced in Cg 1.4.
SEE ALSO
cgGetFirstStateAssignment, cgGetNamedStateAssignment, cgIsStateAssignment