cgCreateParameterArray
Keywords: cgCreateParameterArray, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgCreateParameterArray - creates a parameter array

> ## Synopsis

>     #include <Cg/cg.h>

>     CGparameter cgCreateParameterArray( CGcontext context,
>                                         CGtype type,
>                                         int length );

> ## Parameters

> context
>   The context to which the new parameter will be added.
> type
>   The type of the new parameter.
> length
>   The length of the array being created.

> ## Return Values

> Returns the handle to the new parameter array.

> ## Description

> cgCreateParameterArray creates context level shared parameter arrays. These parameters are primarily used by connecting them to one or more program parameter arrays with cgConnectParameter.

> cgCreateParameterArray works similarly to cgCreateParameter, but creates an array of parameters rather than a single parameter.

> ## Examples

>     CGcontext context = cgCreateContext();
>     CGparameter param = cgCreateParameterArray(context, CG_FLOAT, 5);

> ## 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

> cgCreateParameterArray was introduced in Cg 1.2.

> ## See Also

> cgCreateParameter, cgCreateParameterMultiDimArray, cgDestroyParameter