> # NAME

> cgSetArraySize - sets the size of a resizable array parameter

> # SYNOPSIS

>       #include <Cg/cg.h>

>       void cgSetArraySize( CGparameter param,
>                            int size );

> # PARAMETERS

> param

>   The array parameter handle.

> size

>   The new size of the array.

> # RETURN VALUES

> None.

> # DESCRIPTION

> cgSetArraySize sets the size of a resiable array parameter param to size.

> # EXAMPLES

> If you have Cg program with a parameter like this :

>         /* ... */

>         float4 main(float4 myarray[])
>         {
>           /* ... */
>         }

> You can set the size of the myarray array parameter to 5 like so :

>         CGparameter arrayParam =
>           cgGetNamedProgramParameter(program, CG_PROGRAM, "myarray");

>         cgSetArraySize(arrayParam, 5);

> # ERRORS

> CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter, or if param is not an array.

> CG_ARRAY_PARAM_ERROR is generated if param is not an array parameter.

> CG_ARRAY_HAS_WRONG_DIMENSION_ERROR is generated if the dimension of the array parameter param is not 1.

> CG_PARAMETER_IS_NOT_RESIZABLE_ARRAY_ERROR is generated if param is not a resizable array.

> CG_INVALID_PARAMETER_ERROR is generated if size is less than 0.

> # HISTORY

> cgSetArraySize was introduced in Cg 1.2.

> # SEE ALSO

> cgGetArraySize, cgGetArrayDimension, cgSetMultiDimArraySize