Name
cgCreateEffectParameterMultiDimArray - create a multi-dimensional array in an effect
Synopsis
#include <Cg/cg.h> CGparameter cgCreateEffectParameterMultiDimArray( CGeffect effect, const char * name, CGtype type, int dim, const int * lengths );Parameters
- effect
- The effect to which the new parameter will be added.
- name
- The name of the new parameter.
- type
- The type of the new parameter.
- dim
- The dimension of the array.
- lengths
- The sizes for each dimension of the array.
Return Values
Returns the handle of the new parameter on success.
Returns NULL if an error occurs.
Description
cgCreateEffectParameterMultiDimArray adds a new multidimensional array parameter to the specified effect.
Examples
CGeffect effect = cgCreateEffect( ... ); int lengths[] = {2,2}; CGparameter array = cgCreateEffectParameterMultiDimArray(effect, "myFloatMultiArray", CG_FLOAT, 2, lengths);Errors
CG_INVALID_EFFECT_HANDLE_ERROR is generated if effect is not a valid effect.
CG_INVALID_VALUE_TYPE_ERROR is generated if type is invalid.
History
cgCreateEffectParameterMultiDimArray was introduced in Cg 1.5.
See Also