cgGetFirstLeafEffectParameter

Langue: en

Version: 46949 (openSuse - 09/10/07)

Section: 3 (Bibliothèques de fonctions)

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 the cgGetNextLeafParameter manpage 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

the cgGetNextLeafParameter manpage, the cgGetFirstLeafParameter manpage