NAME

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

SYNOPSIS

  #include <Cg/cg.h>

  CGparameter cgGetNextLeafParameter( CGparameter param );

PARAMETERS

param

The current leaf parameter.

RETURN VALUES

cgGetNextLeafParameter 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.

DESCRIPTION

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

EXAMPLES

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

  CGparameter leaf = cgGetFirstLeafParameter( program );
  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 cgGetFirstLeafEffectParameter.

ERRORS

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

HISTORY

cgGetNextLeafParameter was introduced in Cg 1.1.

SEE ALSO

cgGetFirstLeafParameter, cgGetFirstLeafEffectParameter