Name
cgIsParameterReferenced - determine if a program parameter is potentially referenced
Synopsis
#include <Cg/cg.h>
CGbool cgIsParameterReferenced( CGparameter param );
Parameters
- param
-
The handle of the parameter to check.
Return Values
Returns CG_TRUE if param is a program parameter and is
potentially referenced by the program.
Returns CG_FALSE otherwise.
Description
cgIsParameterReferenced returns CG_TRUE if param is a program
parameter, and is potentially referenced (used) within the program. It
otherwise returns CG_FALSE.
Program parameters are those parameters associated directly
with a CGprogram, whose handles are retrieved by calling, for
example, cgGetNamedProgramParameter.
The value returned by cgIsParameterReferenced is conservative, but
not always exact.
A return value of CG_TRUE indicates that the parameter may be used
by its associated program. A return value of CG_FALSE indicates that the
parameter is definintely not referenced by the program.
If param is an aggregate program parameter (a struct or array), CG_TRUE
is returned if any of param's children are potentially referenced by
the program.
If param is a leaf parameter and the return value is CG_FALSE,
cgGetParameterResource may return CG_INVALID_VALUE
for this parameter.
Examples
to-be-written
Errors
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.
History
cgIsParameterReferenced was introduced in Cg 1.1.
See Also
cgGetNamedProgramParameter,
cgIsParameterUsed,
cgGetParameterResource
|