> ## Name

> cgGetProgramStateAssignmentValue - get a program-valued state assignment's values

> ## Synopsis

>     #include <Cg/cg.h>

>     CGprogram cgGetProgramStateAssignmentValue( CGstateassignment sa );

> ## Parameters

> sa
>   The state assignment.

> ## Return Values

> Returns a CGprogram handle.

> Returns NULL if an error occurs or no program is available.

> ## Description

> cgGetProgramStateAssignmentValue allows the application to retrieve the value(s) of a state assignment that stores a CGprogram.

> ## Examples

> to-be-written

> ## Errors

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

> CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR is generated if sa is not a state assignment of a program type.

> ## History

> cgGetProgramStateAssignmentValue was introduced in Cg 1.4.

> ## See Also

> cgGetStateAssignmentState, cgGetStateType, cgGetFloatStateAssignmentValues, cgGetIntStateAssignmentValues, cgGetBoolStateAssignmentValues, cgGetStringStateAssignmentValue, cgGetSamplerStateAssignmentValue, cgGetTextureStateAssignmentValue