NAME

cgAddStateEnumerant - associates an integer enumerant value as a possible value for a state

SYNOPSIS

  #include <Cg/cg.h>

  void cgAddStateEnumerant(CGstate state, const char *name, int value);

PARAMETERS

state

Specifies the state to associate the name and value with.

name

Specifies the name of the enumerant.

value

Specifies the value of the enumerant.

DESCRIPTION

cgAddStateEnumerant associates a given named integer enumerant value with a state definition. When that state is later used in a pass in an effect file, the value of the state assignment can optionally be given by providing the name of a named enumerant defined with cgAddStateEnumerant. The state assignment will then take on the value provided when the enumerant was defined.

ERRORS

CG_INVALID_STATE_HANDLE_ERROR is generated if state does not refer to a valid state.

SEE ALSO

the "cgCreateState" document, the "cgCreateArrayState" document, the "cgCreateSamplerState" document, the "cgCreateSamplerArrayState" document, and the "cgGetStateName" document.