cgGetStateContext(3)

NAME
cgGetStateContext - get a state's context

SYNOPSIS
  #include <Cg/cg.h>
  const char * cgGetStateContext( CGstate state );

PARAMETERS
The state.

RETURN VALUES
Returns the context for the state.

Returns NULL if state is invalid.

DESCRIPTION
cgGetStateContext allows the application to retrieve the context of a state. This is the context used to create the state with cgCreateState.

EXAMPLES
  CGcontext context = cgCreateContext();
  CGstate state = cgCreateState(context, "GreatStateOfTexas", CG_FLOAT);
  assert(context == cgGetStateContext(state));

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

HISTORY
cgGetStateContext was introduced in Cg 1.5.

SEE ALSO
cgCreateState, cgCreateArrayState, cgGetEffectContext, cgGetParameterContext, cgGetProgramContext