Gamma Preferences
 
 
 

There are three kinds of gamma values which can be set via the 3ds Max preferences dialog. These values can be set and accessed using a global instance the GammaMgr class called gammaMgr defined in the file gamma.h.

Gamma correction can be enabled or disabled via the method GammaMgr::Enable(), and the state can be queried using the method GammaMgr::IsEnabled().

When input gamma is changed in the Preferences dialog, the system broadcasts NOTIFY_BITMAP_CHANGED. This message should be handled by any plug-in handling bitmaps which need to be updated as a result (e.g. Bitmap Textures).

When display gamma is changed in the preferences dialog the system calls UpdateGammaTable() on every BitmapStorage object in memory, and calls RefreshWindow() on every bitmap object. This causes every bitmap and their display windows to refresh. There is no system-wide notification.

No refresh or notification occurs automatically when you call GammaMgr::SetDisplayGamma(). The method BitmapStorage::UpdateGammaTable() must be called for each loaded bitmap when gamma settings are changed programmatically, to ensure that Bitmap::GetLinearPixels() returns correct information at all times.