Name
cgGetConnectedToParameter - gets a connected destination parameter
Synopsis
#include <Cg/cg.h>
CGparameter cgGetConnectedToParameter( CGparameter param,
int index );
Parameters
- param
-
The source parameter.
- index
-
Since there may be multiple destination (to) parameters connected to
param, index is need to specify which one is returned. index
must be within the range of 0 to N - 1 where N is the number
of connected destination parameters.
Return Values
Returns one of the destination parameters connected to param.
Returns NULL if an error occurs.
Description
Returns one of the destination parameters connected to param.
cgGetNumConnectedToParameters should
be used to determine the number of destination parameters connected to
param.
Examples
int nParams = cgGetNumConnectedToParameters( sourceParam );
for ( int i=0; i < nParams; ++i )
{
CGparameter toParam = cgGetConnectedToParameter( sourceParam, i );
/* Do stuff with toParam ... */
}
Errors
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.
CG_OUT_OF_ARRAY_BOUNDS_ERROR is generated if index is less than 0 or
greater than or equal to the number of parameters connected to param.
History
cgGetConnectedToParameter was introduced in Cg 1.2.
See Also
cgConnectParameter,
cgGetNumConnectedToParameters
|