NAME

cgGetParameterBaseType - get a program parameter's base type

SYNOPSIS

  #include <Cg/cg.h>

  CGtype cgGetParameterBaseType( CGparameter param );

PARAMETERS

param

Specifies the parameter.

DESCRIPTION

cgGetParameterBaseType allows the application to retrieve the base type of a parameter.

If param is of a numeric type (scalar, vector, or matrix), the scalar enumerant corresponding to param's type will be returned. For example, if param is of type CG_FLOAT4x3, cgGetParameterBaseType will return CG_FLOAT.

If param is an array, the base type of the array elements will be returned.

If param is a structure, its type-specific enumerant will be returned, as per cgGetParameterNamedType.

Otherwise, param's type enumerant will be returned.

RETURN VALUES

Returns the base type enumerant of param. If an error occurs, CG_UNKNOWN_TYPE will be returned.

ERRORS

CG_INVALID_PARAM_HANDLE_ERROR is generated if param does not refer to a valid parameter.

SEE ALSO

the "cgGetParameterType" document the "cgGetType" document, the "cgGetTypeString" document the "cgGetParameterClass" document