Name
cgGetParameterClass - get a parameter's class
Synopsis
#include <Cg/cg.h>
CGparameterclass cgGetParameterClass( CGparameter param );
Parameters
- param
-
The parameter.
Return Values
Returns the parameter class enumerant of param.
Returns CG_PARAMETERCLASS_UNKNOWN if an error occurs.
Description
cgGetParameterClass allows the application to retrieve
the class of a parameter.
The returned CGparameterclass value enumerates the high-level parameter classes:
- CG_PARAMETERCLASS_SCALAR
-
The parameter is of a scalar type, such as CG_INT, or CG_FLOAT.
- CG_PARAMETERCLASS_VECTOR
-
The parameter is of a vector type, such as CG_INT1, or CG_FLOAT4.
- CG_PARAMETERCLASS_MATRIX
-
The parameter is of a matrix type, such as CG_INT1x1, or CG_FLOAT4x4.
- CG_PARAMETERCLASS_STRUCT
-
The parameter is a struct or interface.
- CG_PARAMETERCLASS_ARRAY
-
The parameter is an array.
- CG_PARAMETERCLASS_SAMPLER
-
The parameter is a sampler.
- CG_PARAMETERCLASS_OBJECT
-
The parameter is a texture, string, or program.
Examples
to-be-written
Errors
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.
History
cgGetParameterClass was introduced in Cg 1.4.
See Also
cgGetParameterClassString,
cgGetParameterClassEnum,
cgGetParameterType,
cgGetType,
cgGetTypeString
|