NAME

cgGetNextLeafParameter - get the next leaf parameter in a program

SYNOPSIS

  #include <Cg/cg.h>

  CGparameter cgGetNextLeafParameter( CGparameter current );

PARAMETERS

prog

Specifies the program to retrieve the first leaf parameter from.

DESCRIPTION

cgGetNextLeafParameter returns the 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 );
   }

RETURN VALUES

cgGetNextLeafParameter returns a the next leaf CGparameter object. NULL is returned if prog is invalid or if prog does not have any more leaf parameters.

ERRORS

CG_INVALID_PARAM_HANDLE_ERROR is generated if prog does not refer to a valid program.

SEE ALSO

the "cgFirstLeafParameter" document