Cg Core Runtime API cgCreateParameterMultiDimArray(3)
NAME
cgCreateParameterultiDimArray - creates a multi-dimensional
parameter array
SYNOPSIS
#include
CGparameter cgCreateParameterMultiDimArray( CGcontext context,
CGtype type,
int dim,
const int * lengths );
PARAMETERS
context The context to which the new parameter will be
added.
type The type of the new parameter.
dim The dimension of the multi-dimensional array.
lengths 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
cgCreateParameterultiDimArray 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.
cgCreateParameterultiDimArray works similarly to
cgCreateParameterArray. 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, CGFLOAT,
3, lengths);
ERORS
CGINVALIDCONTEXTHANDLEROR is generated if context is
not a valid context.
Cg Toolkit 2.1 Last change: 1
Cg Core Runtime API cgCreateParameterMultiDimArray(3)
CGINVALIDVALUETYPEROR is generated if type is invalid.
HISTORY
cgCreateParameterultiDimArray was introduced in Cg 1.2.
SEE ALSO
cgCreateParameter, cgCreateParameterArray,
cgDestroyParameter, cgConnectParameter
Cg Toolkit 2.1 Last change: 2
|