NAME

cgGetArrayType - get the type of an array parameter

SYNOPSIS

  #include <Cg/cg.h>

  CGtype cgGetArrayType(CGparameter param);

PARAMETERS

param

Specifies the array parameter handle.

DESCRIPTION

cgGetArrayType returns the type of the members of an array. If the given array is multi-dimensional, it will return the type of the members of the inner most array.

EXAMPLE

  CGcontext Context = cgCreateContext();
  CGparameter MyArray = cgCreateParameterArray(Context, CG_FLOAT, 5);

  CGtype MyArrayType = cgGetArrayType(MyArray); // This will return CG_FLOAT

RETURN VALUES

Returns the the type of the inner most array. Returns CG_UNKNOWN_TYPE if an error is thrown.

ERRORS

CG_INVALID_PARAM_HANDLE_ERROR is generated if param is invalid.

CG_ARRAY_PARAM_ERROR is generated if param is not an array.

SEE ALSO

cgGetArraySize, and cgGetArrayDimension,