> ## 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