NAME

cgGetArrayTotalSize - get the total size of an array parameter

SYNOPSIS

  #include <Cg/cg.h>

  int cgGetArrayTotalSize( CGparameter param );

PARAMETERS

param

Specifies the array parameter handle.

DESCRIPTION

cgGetArrayTotalSize returns the total number of elements of the array specified by param. The total number of elements is equal to the product of the size of each dimension of the array.

EXAMPLE

Given a handle to a parameter declared as:

float2x3 array[6][1][4];

cgGetArrayTotalSize will return 24.

RETURN VALUES

If param is an array, its total size is returned.

If param is not an array, or if an error occurs, 0 is returned.

ERRORS

CG_INVALID_PARAM_HANDLE_ERROR is generated if param is an invalid parameter handle.

SEE ALSO

the "cgGetArraySize" document, the "cgGetArrayDimension" document, the "cgGetArrayParameter" document