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