Name
cgCreateParameter - create a parameter
Synopsis
#include <Cg/cg.h>
CGparameter cgCreateParameter( CGcontext context,
CGtype type );
Parameters
- context
-
The context to which the new parameter will be added.
- type
-
The type of the new parameter.
Return Values
Returns the handle to the new parameter.
Description
cgCreateParameter creates context level shared parameters. These
parameters are primarily used by connecting them to one or more
program parameters with cgConnectParameter.
Examples
CGcontext context = cgCreateContext();
CGparameter param = cgCreateParameter(context, CG_FLOAT);
Errors
CG_INVALID_VALUE_TYPE_ERROR is generated if type is invalid.
CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context.
History
cgCreateParameter was introduced in Cg 1.2.
See Also
cgCreateParameterArray,
cgCreateParameterMultiDimArray,
cgCreateEffectParameter,
cgDestroyParameter,
cgConnectParameter
|