NAME

cgGetNamedEffectParameter - get a effect parameter by name

SYNOPSIS

  #include <Cg/cg.h>

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

PARAMETERS

effect

Specifies the effect to retrieve the parameter from.

name

Specifies the name of the parameter to retrieve.

DESCRIPTION

The parameters of a effect can be retrieved directly by name using the cgGetNamedEffectParameter function. The names of the parameters in a effect can be discovered by iterating through the effect's parameters (see the "cgGetFirstEffectParameter" document and the "cgGetNextEffectParameter" document), 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".

RETURN VALUES

Returns the named parameter from the effect. If the effect has no parameter corresponding to name, NULL is returned.

ERRORS

CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect does not refer to a valid effect.

SEE ALSO

the "cgIsParameter" document, the "cgGetFirstEffectParameter" document, the "cgGetNextEffectParameter" document, the "cgGetParameterName" document