cgCreateParameterMultiDimArray(3)

NAME
cgCreateParameterMultiDimArray - creates a multi-dimensional parameter array

SYNOPSIS
  #include <Cg/cg.h>
  CGparameter cgCreateParameterMultiDimArray( CGcontext context,
                                              CGtype type,
                                              int dim,
                                              const int * lengths );

PARAMETERS
The context to which the new parameter will be added. The type of the new parameter. The dimension of the multi-dimensional array. An array of length values, one for each dimension of the array to be created.

RETURN VALUES
Returns the handle to the new parameter array.

DESCRIPTION
cgCreateParameterMultiArray creates context level shared multi-dimensional parameter arrays. These parameters are primarily used by connecting them to one or more program parameter arrays with cgConnectParameter.

cgCreateParameterMultiDimArray works similarly to cgCreateParameterMultiArray. Instead of taking a single length parameter it takes an array of lengths, one per dimension. The dimension of the array is defined by the dim parameter.

EXAMPLES
  /* Creates a three dimensional float array similar to the C declaration : */
  /*  float param[5][3][4]; */
  int lengths[] = { 5, 3, 4 };
  CGcontext context = cgCreateContext();
  CGparameter param = cgCreateParameterMultiDimArray(context, CG_FLOAT, 3, lengths);

ERRORS
CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context.

CG_INVALID_VALUE_TYPE_ERROR is generated if type is invalid.

HISTORY
cgCreateParameterMultiDimArray was introduced in Cg 1.2.

SEE ALSO
the cgCreateParameter manpage, the cgCreateParameterArray manpage, the cgDestroyParameter manpage, the cgConnectParameter manpage