Name
cgGetArrayTotalSize - get the total size of an array parameter
Synopsis
#include <Cg/cg.h>
int cgGetArrayTotalSize( CGparameter param );
Parameters
- param
-
The array parameter handle.
Return Values
Returns the total size of param if pararm is an array.
Returns 0 if param is not an array, or if an error occurs.
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.
Examples
Given a handle to a parameter declared as:
-
float2x3 array[6][1][4];
cgGetArrayTotalSize will return 24.
Errors
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.
History
cgGetArrayTotalSize was introduced in Cg 1.4.
See Also
cgGetArraySize,
cgGetArrayDimension,
cgGetArrayParameter
|