cgGetNextStateAssignment(3)

NAME
cgGetNextStateAssignment - iterate through state assignments in a pass

SYNOPSIS
  #include <Cg/cg.h>
  CGstateassignment cgGetNextStateAssignment( CGstateassignment sa );

PARAMETERS
The current state assignment.

RETURN VALUES
Returns the next state assignment in the pass' internal sequence of state assignments.

Returns NULL when prog is the last state assignment in the pass.

DESCRIPTION
The state assignments within a pass can be iterated over by using cgGetNextStateAssignment.

State assignments are returned in the same order specified in the pass in the effect.

EXAMPLES
  CGstateassignment sa = cgGetFirstStateAssignment( pass );
  while( sa )
  {
    /* do something with sa */
    sa = cgGetNextStateAssignment( sa )
  }

ERRORS
CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR is generated if sa is not a valid state assignment.

HISTORY
cgGetNextStateAssignment was introduced in Cg 1.4.

SEE ALSO
the cgGetFirstStateAssignment manpage, the cgGetNamedStateAssignment manpage, the cgIsStateAssignment manpage