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

> ## Name

> cgGetTypeBase - get the base type associated with a type enumerant

> ## Synopsis

>     #include <Cg/cg.h>

>     CGtype cgGetTypeBase( CGtype type );

> ## Parameters

> type
>   The type enumerant.

> ## Return Values

> Returns the scalar base type of the enumerant type.

> ## Description

> cgGetTypeBase returns the base (scalar) type associated with a type enumerant. For example, cgGetTypeBase(CG_FLOAT3x4) returns CG_FLOAT. The base type for a non-numeric type such as CG_STRING, CG_STRUCT, CG_SAMPLER2D, or user-defined types is simply the type itself.

> ## Examples

> to-be-written

> ## Errors

> None.

> ## History

> cgGetTypeBase was introduced in Cg 1.5.

> ## See Also

> cgGetType, cgGetTypeClass, cgGetParameterType