Name

cgGetEnum - get the enumerant assigned with the given string name

Synopsis

#include <Cg/cg.h>

CGenum cgGetEnum( const char * enum_string );

Parameters

enum_string
A string containing the case-sensitive enum name.

Return Values

Returns the enumerant for enum_string.

Returns CG_UNKNOWN if no such enumerant exists

Description

cgGetEnum returns the enumerant assigned to an enum name.

Examples

  CGenum VaryingEnum = cgGetEnum("CG_VARYING");

Errors

CG_INVALID_PARAMETER_ERROR is generated if enum_string is NULL.

History

cgGetEnum was introduced in Cg 1.2.

See Also

cgGetEnumString