Platform SDK: DirectX |
The DirectDrawGammaControl.SetGammaRamp method sets the red, green, and blue gamma ramps for the primary surface.
object.SetGammaRamp( _ flags As CONST_DDSGRFLAGS, _ gammaRamp As DDGAMMARAMP)
If the method fails, it raises an error, and Err.Number can be set to one of the following values:
DDERR_EXCEPTION |
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_OUTOFMEMORY |
Not all systems support gamma calibration. To determine whether gamma calibration is supported, call DirectDraw7.GetCaps, and examine the lCaps2 member of the associated DDCAPS type after the method returns. If the DDCAPS_CANCALIBRATEGAMMA capability flag is present, gamma calibration is supported.
Calibrating gamma ramps incurs some processing overhead and should not be used frequently.
Including the DDSGR_CALIBRATE flag in the flags parameter when running on systems that do not support gamma calibration does not cause this method to fail. The method succeeds, setting new gamma ramp values without calibration.
DirectDrawGammaControl.GetGammaRamp, Gamma and Color Controls