Name
cgGetNamedEffectAnnotation - get an effect annotation by name
Synopsis
#include <Cg/cg.h>
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 NULL 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" );
Errors
CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.
CG_INVALID_POINTER_ERROR is generated if name is NULL.
History
cgGetNamedEffectAnnotation was introduced in Cg 1.5.
See Also
cgGetFirstEffectAnnotation,
cgGetNextAnnotation,
cgGetAnnotationName
|