NAME
    cgGetNextState - iterate through states in a context

SYNOPSIS
      #include <Cg/cg.h>

      CGstate cgGetNextState( CGstate state );

PARAMETERS
    state   Specifies the current state.

DESCRIPTION
    The states within a context can be iterated over by using the
    cgGetNextState function. The following example code illustrates one way
    to do this:

      CGstate state = cgGetFirstState( ctx );
      while( state )
      {
       /* do something with state */
       state = cgGetNextState( state )
      }

    Note that no specific order of traversal is defined by this mechanism.
    The only guarantee is that each state will be visited exactly once. No
    guarantees can be made if states are created or deleted during
    iteration.

RETURN VALUES
    cgGetNextState returns the next state in the context's internal sequence
    of states. Returns 0 when state is the last state in the context.

ERRORS
    CG_INVALID_STATE_HANDLE_ERROR is generated if state does not refer to a
    valid state.

SEE ALSO
    the cgGetNextState manpage, the cgGetNamedState manpage, the
    cgCreateState manpage, and the cgIsState manpage

