> ## Name

> cgGetFirstStateAssignment - get the first state assignment in a pass

> ## Synopsis

>     #include <Cg/cg.h>

>     CGstateassignment cgGetFirstStateAssignment( CGpass pass );

> ## Parameters

> pass
>   The pass from which to retrieve the first state assignment.

> ## Return Values

> Returns the first CGstateassignment object in pass.

> Returns NULL if pass contains no state assignments or an error occurs.

> ## Description

> cgGetFirstStateAssignment is used to begin iteration over all of the state assignment contained within a pass. See cgGetNextStateAssignment for more information.

> ## Examples

> to-be-written

> ## Errors

> CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass.

> ## History

> cgGetFirstStateAssignment was introduced in Cg 1.4.

> ## See Also

> cgGetNextStateAssignment, cgIsStateAssignment