Name
cgCreateEffectParameter - create a parameter in an effect
Synopsis
#include <Cg/cg.h>
CGparameter cgCreateEffectParameter( CGeffect effect,
const char * name,
CGtype type );
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.
Return Values
Returns the handle to the new parameter.
Description
cgCreateEffectParameter adds a new parameter to the specified effect.
Examples
CGeffect effect = cgCreateEffect( ... );
CGparameter param = cgCreateEffectParameter( effect, "myFloatParam", CG_FLOAT );
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
cgCreateEffectParameter was introduced in Cg 1.5.
See Also
cgIsParameter,
cgCreateEffectParameterArray,
cgCreateEffectParameterMultiDimArray,
cgCreateTechnique,
cgCreatePass,
cgConnectParameter
|