cgGetFirstLeafEffectParameter

> # NAME

> cgGetFirstLeafEffectParameter - get the first leaf parameter in an effect

> # SYNOPSIS

>       #include <Cg/cg.h>

>       CGparameter cgGetFirstLeafEffectParameter( CGeffect effect );

> # PARAMETERS

> effect

>   The effect from which to retrieve the first leaf parameter.

> # RETURN VALUES

> Returns the first leaf CGparameter object in effect.

> Returns NULL if effect is invalid or if effect does not have any parameters.

> # DESCRIPTION

> cgGetFirstLeafEffectParameter returns the first leaf parameter in an effect. The combination of cgGetFirstLeafEffectParameter and cgGetNextLeafParameter allows the iteration through all of the parameters of basic data types (not structs or arrays) without recursion. See cgGetNextLeafParameter for more information.

> # EXAMPLES

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

> # ERRORS

> CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.

> # HISTORY

> cgGetFirstLeafEffectParameter was introduced in Cg 1.4.

> # SEE ALSO

> cgGetNextLeafParameter, cgGetFirstLeafParameter