cgSetMultiDimArraySize(3)

NAME
cgSetMultiDimArraySize - sets the size of a resizable multi-dimensional array parameter

SYNOPSIS
  #include <Cg/cg.h>
  void cgSetMultiDimArraySize( CGparameter param,
                               const int * sizes );

PARAMETERS

param
    The array parameter handle.

sizes
    An array of sizes for each dimension of the array.

RETURN VALUES
None.

DESCRIPTION
cgSetMultiDimArraySize sets the size of each dimension of resizable multi-dimensional array parameter param. sizes must be an array that has N number of elements where N is equal to the result of cgGetArrayDimension.

EXAMPLES
If you have Cg program with a parameter like this :

    /* ... */
    float4 main(float4 myarray[][][])
    {
      /* ... */
    }
You can set the sizes of each dimension of the myarray array parameter like so :

    const int sizes[] = { 3, 2, 4 };
    CGparameter myArrayParam =
      cgGetNamedProgramParameter(program, CG_PROGRAM, "myarray");
    cgSetMultiDimArraySize(myArrayParam, sizes);

ERRORS
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter, or if param is not an array.

CG_ARRAY_PARAM_ERROR is generated if param is not an array parameter.

CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR is generated if param is not a resizable array.

HISTORY
cgSetMultiDimArraySize was introduced in Cg 1.2.

SEE ALSO
the cgGetArraySize manpage, the cgGetArrayDimension manpage, the cgSetArraySize manpage