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

> ## Name

> cgGetNextLeafParameter - get the next leaf parameter in a program or effect

> ## Synopsis

>     #include <Cg/cg.h>

>     CGparameter cgGetNextLeafParameter( CGparameter param );

> ## Parameters

> param
>   The current leaf parameter.

> ## Return Values

> Returns the next leaf CGparameter object.

> Returns NULL if param is invalid or if the program or effect from which the iteration started does not have any more leaf parameters.

> ## Description

> cgGetNextLeafParameter returns the next leaf parameter (not struct or array parameters) following a given leaf parameter.

> In a similar manner, the leaf parameters in an effect can be iterated over starting with a call to cgGetFirstLeafEffectParameter.

> ## Examples

>     CGparameter leaf = cgGetFirstLeafParameter( program );
>     while(leaf)
>     {
>       /* Do stuff with leaf */
>       leaf = cgGetNextLeafParameter( leaf );
>     }

> ## Errors

> CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

> ## History

> cgGetNextLeafParameter was introduced in Cg 1.1.

> ## See Also

> cgGetFirstLeafParameter, cgGetFirstLeafEffectParameter