cgGetBehavior(3)

NAME
cgGetBehavior - get the behavior enumerant from a behavior name

SYNOPSIS
  #include <Cg/cg.h>

  CGbehavior cgGetBehavior( const char * behavior_string );

PARAMETERS

behavior_string
    A string containing the case-sensitive behavior name.

RETURN VALUES
Returns the behavior enumerant associated with behavior_string.

Returns CG_BEHAVIOR_UNKNOWN if behavior_string is NULL or if no CGbehavior is associated with the given string.

DESCRIPTION
cgGetBehavior returns the enumerant assigned to a behavior name.

EXAMPLES
  CGbehavior b = cgGetBehavior("latest");

  /* b == CG_BEHAVIOR_LATEST */

ERRORS
CG_INVALID_PARAMETER_ERROR is generated if behavior_string is NULL.

HISTORY
cgGetBehavior was introduced in Cg 3.0.

SEE ALSO
cgGetBehaviorString, cgGetContextBehavior, cgSetContextBehavior