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

> ## Name

> cgGetArrayType - get the type of an array parameter

> ## Synopsis

>     #include <Cg/cg.h>

>     CGtype cgGetArrayType( CGparameter param );

> ## Parameters

> param
>   The array parameter handle.

> ## Return Values

> Returns the the type of the inner most array.

> Returns CG_UNKNOWN_TYPE if an error occurs.

> ## Description

> cgGetArrayType returns the type of the members of an array. If the given array is multi-dimensional, it will return the type of the members of the inner most array.

> ## Examples

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

>     CGtype arrayType = cgGetArrayType(array); /* This will return CG_FLOAT */

> ## Errors

> CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

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

> ## History

> cgGetArrayType was introduced in Cg 1.2.

> ## See Also

> cgGetArraySize, cgGetArrayDimension