cgCreateParameterAnnotation
Keywords: cgCreateParameterAnnotation, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgCreateParameterAnnotation - create an annotation in a parameter

> ## 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 an error occurs.

> ## Description

> cgCreateParameterAnnotation adds a new annotation to the specified parameter.

> ## Examples

>       CGannotation ann = cgCreateParameterAnnotation( param, "Apple", CG_FLOAT );

> ## Errors

> CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

> CG_DUPLICATE_NAME_ERROR is generated if name is already used by an annotation for this parameter.

> CG_INVALID_ENUMERANT_ERROR is generated if type is not CG_INT, CG_FLOAT, CG_BOOL, or CG_STRING.

> ## History

> cgCreateParameterAnnotation was introduced in Cg 1.5.

> ## See Also

> cgGetNamedParameterAnnotation, cgGetFirstParameterAnnotation, cgGetNextAnnotation