PDA

View Full Version : Gamma correction



Paul Sernine
03-29-2004, 09:57 PM
Hello,

I would like to set the gamma correction parameter dynamically in my app.
I know that it is possible with DX (sRGB at texture level and at output level).
Is there a way to achieve this in OpenGL ?

Regards,

Paul

jorge1774
03-29-2004, 11:53 PM
Hi.

I don't know how that can be done in DX, but we use that with windows or linux functions. In windows, gamma ramp can be changed with:

SetDeviceGammaRamp(hDC,(LPVOID)gammaRamp);

See you!

Christian Schüler
03-30-2004, 12:45 AM
Hi Sernine!

Please check what you want to do

[ ] I want to upload a lookup table for the video card's digital-to-analog converter that maps RGB-values stored in the front buffer to different values.

[ ] I want colors from textures be converted to linear space upon entry into the fragment shader and converted back to RGB space upon output of the fragment shader.

Paul Sernine
03-30-2004, 10:34 PM
Thanks a lot for the information.

I am more especially interested in the output ramp.

Regards,

Paul

Paul Sernine
04-01-2004, 09:58 PM
Hi,

I tried this code and I verified that it returned TRUE, I also verified with the Get... function that my curves were transmited. But, nothing happens on screen !
I tried with a hdc=GetDC(NULL) and a hdwn=GetDesktopWindow
hdc=GetDC(hwnd)

But it does not change the results.
I use the glut and I placed my code in various places (no change)

I use an ATi 9700 with cat4.3

Thnaks for your Help,

Paul