Name
cgGetNamedProgramAnnotation - get a program annotation by name
Synopsis
#include <Cg/cg.h>
CGannotation cgGetNamedProgramAnnotation( CGprogram program,
const char * name );
Parameters
- program
-
The program from which to retrieve the annotation.
- name
-
The name of the annotation to retrieve.
Return Values
Returns the named annotation.
Returns NULL if the program has no annotation corresponding to name.
Description
The annotations associated with a program can be retrieved directly by name
using cgGetNamedProgramAnnotation. The names of a
program's annotations can be discovered by iterating through the
annotations (see cgGetFirstProgramAnnotation and
cgGetNextAnnotation), calling cgGetAnnotationName for each one in
turn.
Examples
/* fetch annotation "Apple" from CGprogram program */
CGannotation ann = cgGetNamedProgramAnnotation( program, "Apple" );
Errors
CG_INVALID_PROGRAM_HANDLE_ERROR is generated if program
is not a valid program handle.
History
cgGetNamedProgramAnnotation was introduced in Cg 1.4.
See Also
cgGetFirstProgramAnnotation,
cgGetNextAnnotation,
cgGetAnnotationName
|