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

Specifies the array parameter handle.

sizes

An array of sizes for each dimension of the array.

DESCRIPTION

cgSetMultiDimArraySize sets the size of each dimension of resiable 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.

EXAMPLE

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);

RETURN VALUES

cgSetMultiArraySize does not return any values.

ERRORS

CG_INVALID_PARAM_HANDLE_ERROR is generated if param is an invalid parameter handle or not an array.

CG_ARRAY_PARAM_ERROR if param is not an array param.

CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR is generated if param is not a resizable array.

SEE ALSO

the "cgGetArraySize" document, the "cgGetArrayDimension" document, and the "cgSetArraySize" document