NAME
    cgGetStateAssignmentIndex - get the array index of a state assignment
    for array-valued state

SYNOPSIS
      #include <Cg/cg.h>

      int cgGetStateAssignmentIndex( CGstateassignment sa );

PARAMETERS
    sa      The state assignment.

RETURN VALUES
    Returns an integer index value.

    Returns 0 if the CGstate for this state assignment is not an array type.

DESCRIPTION
    cgGetStateAssignmentIndex returns the array index of a state assignment
    if the state it is based on is an array type.

EXAMPLES
    Given a "LightPosition" state defined as an array of eight float3 values
    and an effect file with the following state assignment:

       pass { LightPosition[3] = float3(10,0,0); }

    cgGetStateAssignmentIndex will return 3 when passed a handle to this
    state assignment.

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

HISTORY
    cgGetStateAssignmentIndex was introduced in Cg 1.4.

SEE ALSO
    cgIsStateAssignment, cgCreateStateAssignmentIndex

