Name
cgCreateEffectParameterArray - create an array parameter in an effect
Synopsis
#include <Cg/cg.h>
CGparameter cgCreateEffectParameterArray( CGeffect effect,
const char * name,
CGtype type,
int length );
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.
- length
-
The size of the array.
Return Values
Returns the handle to the new array parameter on success.
Returns NULL if an error occurs.
Description
cgCreateEffectParameterArray adds a new array parameter to the specificed effect.
Examples
CGeffect effect = cgCreateEffect( ... );
CGparameter array = cgCreateEffectParameterArray( effect, "myFloatArray",
CG_FLOAT, 2 );
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
cgCreateEffectParameterArray was introduced in Cg 1.5.
See Also
cgCreateEffectParameter,
cgCreateEffectParameterMultiDimArray
|