NAME

cgGetUserType - gets a user defined type from a program

SYNOPSIS

  #include <Cg/cg.h>

  CGtype cgGetUserType(CGprogram program, int index);

PARAMETERS

program

The program the type is defined in.

index

The index of the user defined type. index must be greater than or equal to 0 and less than N where N is the value returned by cgGetNumUserTypes.

DESCRIPTION

cgGetUserType returns the user defined type with the index index in program.

RETURN VALUES

Returns the type if the call is successfull. CG_UNKNOWN_TYPE if type is a built-in type or an error is thrown.

ERRORS

CG_INVALID_PROGRAM_HANDLE_ERROR is generated if program is invalid.

CG_OUT_OF_ARRAY_BOUNDS_ERROR is generated if index is outside the proper range.

SEE ALSO

the "cgGetNumUserTypes" document, and the "cgGetNamedUserType" document