Name
cgIsParameter - determine if a parameter handle references a valid parameter
Synopsis
#include <Cg/cg.h>
CGbool cgIsParameter( CGparameter param );
Parameters
- param
-
The parameter handle to check.
Return Values
Returns CG_TRUE if param references a valid parameter object.
Returns CG_FALSE otherwise.
Description
cgIsParameter returns CG_TRUE if param references a valid
parameter object. cgIsParameter is typically used for iterating
through the parameters of an object. It can also be used as
a consistency check when the application caches CGparameter
handles. Certain program operations like deleting the program
or context object that the parameter is contained in will cause
a parameter object to become invalid.
Examples
if (cgIsParameter(param)) {
/* do something with param */
} else {
/* handle situation where param is not a valid parameter */
}
Errors
None.
History
cgIsParameter was introduced in Cg 1.1.
See Also
cgGetNextParameter
|