cgGetStateLatestProfile(3)

NAME
cgGetStateLatestProfile - gets a state's designated latest profile

SYNOPSIS
  #include <Cg/cg.h>

  CGprofile cgGetStateLatestProfile( CGstate state );

PARAMETERS

state
    The state handle.

RETURN VALUES
Returns the designated latest profile if state is of type CG_PROGRAM_TYPE.

Returns CG_PROFILE_UNKNOWN otherwise.

DESCRIPTION
cgGetStateLatestProfile gets 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
Get the latest profile for fragment programs:

  CGstate state = cgGetNamedState(context, "FragmentProgram");
  CGprofile profile = cgGetStateLatestProfile(state);

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

HISTORY
cgGetStateLatestProfile was introduced in Cg 2.2.

SEE ALSO
cgGetNamedState, cgSetStateLatestProfile