NAME

cgGetFirstParameter - get the first parameter in a program

SYNOPSIS

  #include <Cg/cg.h>

  CGparameter cgGetFirstParameter( CGprogram prog, CGenum name_space );

PARAMETERS

prog

Specifies the program to retrieve the first parameter from.

name_space

Specifies the namespace of the parameter to iterate through. Currently CG_PROGRAM and CG_GLOBAL are supported.

DESCRIPTION

cgGetFirstParameter returns the first top-level parameter in a program. This function is used for recursing through all parameters in a program. See the "cgGetNextParameter" document for more information on parameter traversal.

RETURN VALUES

cgGetFirstParameter returns a the first CGparameter object in prog. NULL is returned if prog is invalid or if prog does not have any parameters.

ERRORS

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

CG_INVALID_ENUMERANT_ERROR is generated if name_space is not CG_PROGRAM or CG_GLOBAL.

SEE ALSO

the "cgNextParameter" document