cgGetStateContext(3)

NAME
cgGetStateContext - get a state's context

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

PARAMETERS

state
    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 the cgCreateState manpage.

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 (after beta 2).

SEE ALSO
the cgCreateState manpage, the cgCreateArrayState manpage, the cgGetEffectContext manpage, the cgGetParameterContext manpage, the cgGetProgramContext manpage