Name

cgGetEnumString - get the name string associated with an enumerant

Synopsis

#include <Cg/cg.h>

const char * cgGetEnumString( CGenum enum );

Parameters

enum
The enumerant.

Return Values

Returns the string representation of the enumerant enum.

Returns NULL if enum is not a valid Cg enumerant.

Description

cgGetEnumString returns the name string associated with an enumerant. It's primary use to print debugging information.

Examples

/* This prints "CG_UNIFORM" to stdout */
const char *EnumString = cgGetEnumString(CG_UNIFORM);
printf("%s\n", EnumString);

Errors

None.

History

cgGetEnumString was introduced in Cg 1.2.

See Also

cgGetEnum