NAME

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

SYNOPSIS

  #include <Cg/cg.h>

  CGparameter cgGetNextLeafParameter( CGparameter param );

PARAMETERS

param

Specifies the current leaf parameter.

DESCRIPTION

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

The following is an example of how to iterate through all the leaf parameters in a program:

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

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

RETURN VALUES

the "cgGetNextLeafParameter" document returns a the next leaf CGparameter object. NULL is returned if param is invalid or if the program or effect that iteration started from does not have any more leaf parameters.

ERRORS

CG_INVALID_PARAM_HANDLE_ERROR is generated if param does not refer to a valid parameter.

SEE ALSO

the "cgGetFirstLeafParameter" document, the "cgGetFirstLeafEffectParameter" document