NAME
cgCreateParameterAnnotation - create a parameter annotation
SYNOPSIS
#include <Cg/cg.h> CGannotation cgCreateParameterAnnotation( CGparameter param, const char * name, CGtype type );PARAMETERS
- parm
The parameter to which the new annotation will be added.
- name
The name of the new annotation.
- type
The type of the new annotation.
RETURN VALUES
Returns the new CGannotation handle on success.
Returns NULL if any error occurs.
DESCRIPTION
cgCreateParameterAnnotation adds a new annotation to the parameter.
EXAMPLES
The following example code illustrates the use of cgCreateParameterAnnotation:
// create a float annotation named "Apple" for CGparameter param CGannotation anno = cgCreateParameterAnnotation( param, "Apple", CG_FLOAT );ERRORS
CG_INVALID_PARAMETER_HANDLE_ERROR is generated if param is not a valid parameter.
CG_DUPLICATE_NAME_ERROR is generated if name is is already used by an annotation for this parameter.
CG_INVALID_ENUMERANT_ERROR is generated if type is not one of CG_INT, CG_FLOAT, CG_BOOL, or CG_STRING.
HISTORY
cgCreateParameterAnnotation was introduced in Cg 1.5.
SEE ALSO
cgGetNamedParameterAnnotation, cgGetFirstParameterAnnotation