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

> ## Name

> cgGetNamedUserType - get enumerant associated with type name

> ## Synopsis

>     #include <Cg/cg.h>

>     CGtype cgGetNamedUserType( CGhandle handle,
>                                const char * name );

> ## Parameters

> handle
>   The CGprogram or CGeffect in which the type is defined.
> name
>   A string containing the case-sensitive type name.

> ## Return Values

> Returns the type enumerant associated with name.

> Returns CG_UNKNOWN_TYPE if no such type exists.

> ## Description

> cgGetNamedUserType returns the enumerant associated with the named type defined in the constuct associated with handle, which may be a CGprogram or CGeffect.

> For a given type name, the enumerant returned by this entry point is guaranteed to be identical if called with either an CGeffect handle, or a CGprogram that is defined within that effect.

> If two programs in the same context define a type using identical names and definitions, the associated enumerants are also guaranteed to be identical.

> ## Examples

> to-be-written

> ## Errors

> CG_INVALID_PARAMETER_ERROR is generated if handle is not a valid program or effect.

> ## History

> cgGetNamedUserType was introduced in Cg 1.2.

> ## See Also

> cgGetUserType, cgGetType