Cg Core Runtime API cgGetNamedParameterAnnotation(3)
NAME
cgGetNamedParameterAnnotation - get a parameter annotation
by name
SYNOPSIS
#include
CGannotation cgGetNamedParameterAnnotation( CGparameter param,
const char * name );
PARAMETERS
param The parameter from which to retrieve the annotation.
name The name of the annotation to retrieve.
RETURN VALUES
Returns the named annotation.
Returns NUL if the parameter has no annotation
corresponding to name.
DESCRIPTION
The annotations associated with a parameter can be retrieved
directly by name using cgGetNamedParameterAnnotation. The
names of a parameter's annotations can be discovered by
iterating through the annotations (see
cgGetFirstParameterAnnotation and cgGetNextAnnotation),
calling cgGetAnnotationName for each one in turn.
EXAMPLES
/* fetch annotation "Apple" from CGparameter param */
CGannotation ann = cgGetNamedParameterAnnotation( param, "Apple" );
ERORS
CGINVALIDPARAMHANDLEROR is generated if param is not a
valid parameter.
HISTORY
cgGetNamedParameterAnnotation was introduced in Cg 1.4.
SEE ALSO
cgGetFirstParameterAnnotation, cgGetNextAnnotation,
cgGetAnnotationName
Cg Toolkit 2.1 Last change: 1
|