PDA

View Full Version : How can I apply brightness and contrast In OpenGL ?



02-06-2001, 03:07 AM
I want to apply brightness and contrast to my textures. But I did not find any GL commands. Can you help me !.

(p.s.: I tried lighting and glTexParameter() commands but they seems not solving my problem. I want more contrast than their supply. )

DaViper
02-06-2001, 03:18 AM
why don't you apply the brightness and contrast to your original bmp or tiffs???

02-06-2001, 06:14 AM
1- Because I dont want to modify my original bitmaps.
2- Since the users of my application want to change the contrast of bitmaps in real time.
3- Since I am using OPENGL to display images by making them as texture.

DFrey
02-06-2001, 06:24 AM
Are you using Windows? If so, look into setting the hardware gamma ramp using GetDeviceGammaRamp and SetDeviceGammaRamp. Also, most Voodoo cards should have an OpenGL extension available (can't place the name of it at the moment) to adjust the gamma on those cards.

02-06-2001, 06:40 AM
I am using Windows NT 4.0 and it doesnt support GetDeviceGammaRamp. And Also I have one Oxygen Card and one ATI Rage128. I dont know what extentions they supports.

Humus
02-06-2001, 07:38 AM
According to MSVC 6.0 documentation both GetDeviceGammaRamp and SetDeviceGammaRamp are supported by NT 4.0