cgIsParameter(3)

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
the cgGetNextParameter manpage