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

> ## Name

> cgGetNamedEffectParameter - get an effect parameter by name

> ## Synopsis

>     #include <Cg/cg.h>

>     CGparameter cgGetNamedEffectParameter( CGeffect effect,
>                                            const char * name );

> ## Parameters

> effect
>   The effect from which to retrieve the parameter.
> name
>   The name of the parameter to retrieve.

> ## Return Values

> Returns the named parameter from the effect.

> Returns NULL if the effect has no parameter corresponding to name.

> ## Description

> The parameters of a effect can be retrieved directly by name using cgGetNamedEffectParameter. The names of the parameters in a effect can be discovered by iterating through the effect's parameters (see cgGetFirstEffectParameter and cgGetNextParameter), calling cgGetParameterName for each one in turn.

> The given name may be of the form "foo.bar[2]", which retrieves the second element of the array "bar" in a structure named "foo".

> ## Examples

> to-be-written

> ## Errors

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

> ## History

> cgGetNamedEffectParameter was introduced in Cg 1.4.

> ## See Also

> cgGetFirstEffectParameter, cgGetNextParameter, cgGetParameterName, cgGetNamedParameter