Rechercher une page de manuel
cgCreateParameterMultiDimArray
Langue: en
Version: 46744 (openSuse - 09/10/07)
Section: 3 (Bibliothèques de fonctions)
NAME
cgCreateParameterMultiDimArray - creates a multi-dimensional parameter arraySYNOPSIS
#include <Cg/cg.h>
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
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 manpageContenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre