NAME
cgGetNextStateAssignment - iterate through state assignments in a pass
SYNOPSIS
#include <Cg/cg.h> CGstateassignment cgGetNextStateAssignment( CGstateassignment sa );PARAMETERS
- sa
Specifies the current state assignment.
DESCRIPTION
The state assignments within a pass can be iterated over by using the cgGetNextStateAssignment function. 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.
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.
ERRORS
CG_INVALID_STATE ASSIGNMENT_HANDLE_ERROR is generated if sa does not refer to a valid state assignment.
SEE ALSO
the "cgGetFirstStateAssignment" document, the "cgGetNamedStateAssignment" document, and the "cgIsStateAssignment" document