cgUpdateProgramParameters

> # NAME

> cgUpdateProgramParameters - update the 3D API state for deferred parameters

> # SYNOPSIS

>       #include <Cg/cg.h>

>       void cgUpdateProgramParameters( CGprogram program );

> # PARAMETERS

> program

>   The program for which deferred parameters will be sent to the corresponding 3D API parameters.

> # RETURN VALUES

> None.

> # DESCRIPTION

> cgUpdateProgramParameters performs the appropriate 3D API commands to set the 3D API resources for all of program's parameters that are marked update deferred and clears the update deferred state of these parameters. cgUpdateProgramParameters does nothing when none of program's parameters are marked update deferred.

> cgUpdateProgramParameters assumes the specified program has already been bound using the appropriate 3D API commands. Results are undefined if the program is not actually bound by the 3D API when cgUpdateProgramParameters is called, with the likely result being that the 3D API state for program's parameters will be mis-loaded.

> # EXAMPLES

>       /* assumes cgGetProgramContext(program) == context */

>       if (cgGetParameterSettingMode(context) == CG_DEFERRED_PARAMETER_SETTING) {
>         cgUpdateProgramParameters(program);
>       }

> # ERRORS

> CG_INVALID_PROGRAM_HANDLE_ERROR is generated if program is not a valid program handle.

> # HISTORY

> cgUpdateProgramParameters was introduced in Cg 2.0.

> # SEE ALSO

> cgSetParameterSettingMode, cgGetParameterSettingMode, cgUpdatePassParameters, cgSetParameter, cgGLBindProgram, cgD3D9BindProgram, cgD3D8BindProgram