cgGetDependentAnnotationParameter
Keywords: cgGetDependentAnnotationParameter, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgGetDependentAnnotationParameter - get one of the parameters that an annotation's value depends on

> ## Synopsis

>     #include <Cg/cg.h>

>     CGparameter cgGetDependentAnnotationParameter( CGannotation ann,
>                                                    int index );

> ## Parameters

> ann
>   The annotation handle.
> index
>   The index of the parameter to return.

> ## Return Values

> Returns a handle to the selected dependent annotation on success.

> Returns NULL if an error occurs.

> ## Description

> Annotations in CgFX files may include references to one or more effect parameters on the right hand side of the annotation that are used for computing the annotation's value. cgGetDependentAnnotationParameter returns one of these parameters, as indicated by the given index. cgGetNumDependentAnnotationParameters can be used to determine the total number of such parameters.

> This information can be useful for applications that wish to cache the values of annotations so that they can determine which annotations may change as the result of changing a particular parameter's value.

> ## Examples

> to-be-written

> ## Errors

> CG_INVALID_ANNOTATION_HANDLE_ERROR is generated if ann is not a valid annotation.

> CG_OUT_OF_ARRAY_BOUNDS_ERROR is generated if index is less than zero or greater than or equal to the number of dependent parameters, as returned by cgGetNumDependentAnnotationParameters.

> ## History

> cgGetDependentAnnotationParameter was introduced in Cg 1.4.

> ## See Also

> cgGetDependentStateAssignmentParameter, cgGetNumDependentAnnotationParameters