cgDisconnectParameter
Keywords: cgDisconnectParameter, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgDisconnectParameter - disconnects two parameters

> ## Synopsis

>     #include <Cg/cg.h>

>     void cgDisconnectParameter( CGparameter param );

> ## Parameters

> param
>   The destination parameter in the connection that will be disconnected.

> ## Return Values

> None.

> ## Description

> cgDisconnectParameter disconnects an existing connection made with cgConnectParameter between two parameters. Since a given parameter can only be connected to one source parameter, only the destination parameter is required as an argument to cgDisconnectParameter.

> If the type of param is an interface and the struct connected to it implements the interface, any sub-parameters created by the connection will also be destroyed. See cgConnectParameter for more information.

> ## Examples

>     CGparameter timeParam = cgGetNamedParameter(program, "time");
>     CGparameter sharedTime = cgCreateParameter(context,
>                                                cgGetParameterType(timeParam));

>     cgConnectParameter(sharedTime, timeParam);

>     /* ... */

>     cgDisconnectParameter(timeParam);

> ## Errors

> CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

> ## History

> cgDisconnectParameter was introduced in Cg 1.2.

> ## See Also

> cgGetConnectedParameter, cgGetConnectedToParameter, cgConnectParameter