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 connected destination parameters to param. (CGparameter)0 is returned if an error is thrown.
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 i; int NParams = cgGetNumConnectedToParameters(SourceParam); for(int i=0; i < NParams; ++i) { CGparameter ToParam = cgGetConnectedToParameter(SourceParam, i); // Do stuff to ToParam ... }ERRORS
CG_INVALID_PARAM_HANDLE_ERROR is generated if param does not refer to a valid parameter.
CG_OUT_OF_ARRAY_BOUNDS_ERROR is generated if index is not greater than equal to 0 or less than what cgGetNumConnectedToParameters returns.
HISTORY
cgGetConnectedToParameter was introduced in Cg 1.2.
SEE ALSO