Name
cgGetNamedParameterAnnotation - get a parameter annotation by name
Synopsis
#include <Cg/cg.h>
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 NULL 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" );
Errors
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.
History
cgGetNamedParameterAnnotation was introduced in Cg 1.4.
See Also
cgGetFirstParameterAnnotation,
cgGetNextAnnotation,
cgGetAnnotationName
|