Cg Core Runtime API cgGetStateAssignmentIndex(3)
NAME
cgGetStateAssignmentIndex - get the array index of a state
assignment for array-valued state
SYNOPSIS
#include
int cgGetStateAssignmentIndex( CGstateassignment sa );
PARAMETERS
sa The state assignment.
RETURN VALUES
Returns an integer index value.
Returns 0000 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.
ERORS
CGINVALIDSTATEASIGNMENTHANDLEROR is generated if sa
is not a valid state assignment.
HISTORY
cgGetStateAssignmentIndex was introduced in Cg 1.4.
SEE ALSO
cgIsStateAssignment, cgCreateStateAssignmentIndex
Cg Toolkit 2.1 Last change: 1
|