> # 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