Gamma - get current gamma, brightness and contrast ?

hi

Is there a way to retrieve the current gamma, brightness and contrast values of the system? I need it to set the default values of appropriate sliders.

It seems to be read in the GLAutoDrawableDingsbumsImpl class, but is not passed to the public. Wouldn’t this be an important thing (API enhancement) ?

Marvin

The gamma functionality doesn’t work that way on the various platforms. They all phrase things in terms of a gamma ramp. JOGL mimics LWJGL’s API (and, as you can see from the comments, was inspired by their implementation as well) in this area to simplify the setting of the gamma ramps in terms of these three parameters, but there is no guarantee that the existing gamma ramp’s shape can be re-inferred in terms of these three parameters.

I’d suggest you do some testing on various machines to see what reasonable defaults might be to present to the end user in a GUI. You also might contact the Jake2 authors as I think they use the Gamma class.

Thank you very much for the detailed reply :).

Please help me to understand this gamma ramp thing. Is it to be understood as a gamma offset to the current system’s setting?

Good suggestion.

Marvin

You’ll have to read up on the APIs on the various platforms, which all behave pretty similarly. This tech note describes the Mac OS X CGSetDisplayTransferByTable. XF86VidModeSetGammaRamp is used on X11 platforms, and SetDeviceGammaRamp on Windows. See MacOSXGLDrawableFactory.java, MacOSXWindowSystemInterface.m, WindowsGLDrawableFactory.java and X11GLDrawableFactory.java in the JOGL source tree.

Thanks.