Name
cgUpdatePassParameters - update the deferred parameters for a pass
Synopsis
#include <Cg/cg.h>
void cgUpdatePassParameters( CGpass pass );
Parameters
- pass
-
The pass for which deferred parameters will be updated.
Return Values
None.
Description
cgUpdatePassParameters is a convenience routine which calls
cgUpdateProgramParameters for all
programs of a pass.
Examples
cgSetParameterSettingMode(context, CG_DEFERRED_PARAMETER_SETTING);
CGeffect effect = cgCreateEffectFromFile( context, "tst.cgfx", NULL );
CGtechnique tech1 = cgGetNamedTechnique( effect, "tech1" );
CGpass pass1 = cgGetNamedPass( tech1, "pass1" );
cgSetPassState(pass1);
for (some number of times)
{
cgSetParameter(uniform1,...);
cgSetParameter(uniform2,...);
cgUpdatePassParameters(pass1);
DrawSomeGeometry();
}
cgResetPassState(pass1);
Errors
CG_INVALID_PASS_HANDLE_ERROR is generated if pass is not a valid pass.
History
cgUpdatePassParameters was introduced in Cg 2.1.
See Also
cgSetParameterSettingMode,
cgGetParameterSettingMode,
cgUpdateProgramParameters,
cgSetParameter,
cgGLBindProgram,
cgD3D9BindProgram
|