Name
cgGetNextAnnotation - iterate through annotations
Synopsis
#include <Cg/cg.h>
CGannotation cgGetNextAnnotation( CGannotation ann );
Parameters
- ann
-
The current annotation.
Return Values
Returns the next annotation in the sequence of annotations associated with
the annotated object.
Returns NULL when ann is the last annotation.
Description
The annotations associated with a parameter, pass, technique, or program
can be iterated over by using cgGetNextAnnotation.
Note that no specific order of traversal is defined by this mechanism.
The only guarantee is that each annotation will be visited exactly once.
Examples
CGannotation ann = cgGetFirstParameterAnnotation( param );
while( ann )
{
/* do something with ann */
ann = cgGetNextAnnotation( ann );
}
Errors
CG_INVALID_ANNOTATION_HANDLE_ERROR is generated if ann is not a valid annotation.
History
cgGetNextAnnotation was introduced in Cg 1.4.
See Also
cgGetFirstParameterAnnotation,
cgGetFirstPassAnnotation,
cgGetFirstTechniqueAnnotation,
cgGetFirstProgramAnnotation,
cgGetNamedParameterAnnotation,
cgGetNamedPassAnnotation,
cgGetNamedTechniqueAnnotation,
cgGetNamedProgramAnnotation,
cgIsAnnotation
|