NAME
    cgGetNamedState - get a context state by name

SYNOPSIS
      #include <Cg/cg.h>

      CGstate cgGetNamedState( CGcontext context,
                               const char * name );

PARAMETERS
    context The context from which to retrieve the state.

    name    The name of the state to retrieve.

RETURN VALUES
    Returns the named state from the context.

    Returns NULL if the context has no state corresponding to name.

DESCRIPTION
    The states of a context can be retrieved directly by name using
    cgGetNamedState. The names of the states in a context can be discovered
    by iterating through the context's states (see cgGetFirstState and
    cgGetNextState), calling cgGetStateName for each one in turn.

EXAMPLES
    *to-be-written*

ERRORS
    CG_INVALID_PARAMETER_ERROR is generated if name is NULL.

HISTORY
    cgGetNamedState was introduced in Cg 1.4.

SEE ALSO
    cgCreateState, cgGetFirstState, cgGetNextState, cgGetStateEnumerantName,
    cgGetStateEnumerantValue, cgGetStateName, cgGetStateType, cgIsState

