Name
cgGetParameterBaseType - get a program parameter's base type
Synopsis
#include <Cg/cg.h>
CGtype cgGetParameterBaseType( CGparameter param );
Parameters
- param
-
The parameter.
Return Values
Returns the base type enumerant of param.
Returns CG_UNKNOWN_TYPE if an error occurs.
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.
Examples
to-be-written
Errors
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.
History
cgGetParameterBaseType was introduced in Cg 1.4.
See Also
cgGetParameterType,
cgGetParameterNamedType,
cgGetType,
cgGetTypeString,
cgGetParameterClass
|