Games Have Brightness Option. How does this work?

Started by
3 comments, last by BillyBillyBilly 20 years, 5 months ago
Is there an command to adjust the display adapter''s brightness like there is in directx? How do opengl games adjust brightness?
Advertisement
I do it by drawing a big white alpha blended quad over the screen to increase the brightness, or a big black quad to decrease the brightness.

There may be a better way using extensions, but I haven''t come across it.

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

You can adjust your gamma using SetDeviceGammaRamp in windows
(see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/icm/icm_0yi8.asp)
I believe the best way of doing this is to set the operating system''s gamma function/gamma ramp. When using SDL with OpenGL, you should be able to use SDL''s gamma wrapper functions SDL_SetGamma() and SDL_SetGammaRamp(). If you aren''t using SDL, you''ll have to use the X or the Win32 functions, respectively.

- JQ
~phil
Thanks, that''s perfect. :-)

This topic is closed to new replies.

Advertisement