> # NAME

> cgSetStateLatestProfile - sets a state's designated latest profile

> # SYNOPSIS

>       #include <Cg/cg.h>

>       CGprofile cgSetStateLatestProfile( CGstate state, CGprofile profile );

> # PARAMETERS

> state

>   The state handle.

> profile

>   The profile to designate as the state's latest profile.

> # RETURN VALUES

> None.

> # DESCRIPTION

> cgSetStateLatestProfile sets the specified state's designated latest profile for states of type CG_PROGRAM_TYPE.

> This profile is used to compile the program for a state assignment for the state where the profile in the compile statement is the identifier latest.

> # EXAMPLES

> This shows how to force the designated latest state profile for the FragmentProgram state assignment to be the arbfp1 profile (even if cgGLRegisterStates was to register a different profile).

>       cgGLRegisterStates(context);
>       CGstate state = cgGetNamedState(context, "FragmentProgram");
>       cgSetStateLatestProfile(state, CG_PROFILE_ARBFP1);

> # ERRORS

> CG_INVALID_STATE_HANDLE_ERROR is generated if state is not a valid state.

> CG_STATE_ASSIGNMENT_TYPE_MISMATCH_ERROR is generated if the type of state is not CG_PROGRAM_TYPE.

> # HISTORY

> cgSetStateLatestProfile was introduced in Cg 2.2.

> # SEE ALSO

> cgGetNamedState, cgGetStateLatestProfile, cgGLRegisterStates