Name
cgCreateTechniqueAnnotation - create a technique annotation
Synopsis
#include <Cg/cg.h>
CGannotation cgCreateTechniqueAnnotation( CGtechnique tech,
const char * name,
CGtype type );
Parameters
- tech
-
The technique 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
cgCreateTechniqueAnnotation adds a new annotation to the technique.
Examples
/* create a float annotation named "Apple" for CGtechnique technique */
CGannotation ann = cgCreateTechniqueAnnotation( tech, "Apple", CG_FLOAT );
Errors
CG_INVALID_TECHNIQUE_HANDLE_ERROR is generated if tech is not a valid technique.
CG_DUPLICATE_NAME_ERROR is generated if name is already used by an annotation for
this technique.
CG_INVALID_ENUMERANT_ERROR is generated if type is not
CG_INT, CG_FLOAT, CG_BOOL, or CG_STRING.
History
cgCreateTechniqueAnnotation was introduced in Cg 1.5.
See Also
cgGetNamedTechniqueAnnotation,
cgGetFirstTechniqueAnnotation,
cgGetNextAnnotation
|