Adjusting the Brightness of the VideoCard´s Output?

Yes how can one change the brightness of the video cards output?
I mean like the brightness slider in all modern games.
I looked for OpenGl commands,but that seems to be wrong.(at least I cannot find one).
Thanx in advance,XBTC!

There is no (as far as I know) OpenGL-function to boost brightness. But you can do it yourself if you want to, by calling all color-functions like this.

glColor3f(redbright, greenbright, blue*bright)

… where bright is the brighness you want. 0=black, 1=standard color, 2=twice as bright and so on.

Thre is also a function in Win32 called SetDeviceGammaRamp, haven’t tried it but you can look in the documentation.

Thanx!
I think I´ll look into setgamma,…
In my engine I don´t pass colors,´cause I´m using textures for everything,so why should I pass colors(and waste speed and memory) if I don´t need them,only to set the brightness??
Thanx again,XBTC!

What about vertex lighting ?
Do you have your own lighting engine ?

If not you’re passing colors for the vertices for OpenGL to compute the right color taking into account lighting.

If yes, you’ll lose the benefit of hardware Lighting.
(Ok on a GeForce it’s not so good but they’ll improve the L part of the silicon)

Thanx Igenu but I use lightmaps,thats why I don´t pass any colors!
And I looked into SetDeviceGammaRamp,but as far as I understand this works only in 256 color mode,´cause the other modes(16,24,32bit) don´t use a color lookup-table,
the colors are drawn by the card directly.It doesn´t work in these modes,´cause SetDeviceGammaRamp only changes the
color-lookup table.

Perhaps somebody has another idea?

Thanx in advance,XBTC!

Originally posted by XBCT:
And I looked into SetDeviceGammaRamp,but as far as I understand this works only in 256 color mode,´cause the other modes(16,24,32bit) don´t use a color lookup-table,
the colors are drawn by the card directly.It doesn´t work in these modes,´cause SetDeviceGammaRamp only changes the
color-lookup table.

Perhaps somebody has another idea?

[/b]


From MSDN

The SetDeviceGammaRamp function sets the gamma ramp on direct color display boards having drivers that support downloadable gamma ramps in hardware.

Direct color display modes do not use color lookup tables and are usually 16, 24, or 32 bit. Not all direct color video boards support loadable gamma ramps. SetDeviceGammaRamp succeeds only for devices with drivers that support downloadable gamma ramps in hardware.

Hey thanx!
I´ll give it a try!