Some sort of blending?

I need to do gamma correction on my buffer. Vurrently i do it per pixel, but thats getting too slow now. How can i alter all the r, g, b channels independantly in the buffer by a given amount/equation?

The simplest what comes to my mind is using a fragment shader. Is it an option for you? If not, just gnore my post :wink:

check this tutorial:

Well i noticed the gammaramp API call but also noticed a few places back in 2002 saying that its isnt implemented on many cards, and thought they were pahsing it out not in? Anyway couldnt get it to do anything on my app.

Actually no it must be my cack coding, the demo works!

Anyone know how the gamma curve (correction factor) is applied to within the setdevicegammaramp function? i need to know so i can implement my own gamma corretion function. ta

check this article:

Yep seen that, but we use a different gamma correction equation/curve, and so i need to know what setgamma does once it receives the gamma correction curve/ramp, as in how it applies it to the frame buffer

Read the manual. It’s a simple mapping of R, G, and B channels from display RAM contents to monitor output done on the fly by the DAC and described as a table of 256 entries for R, G and B. Means it does not affect the frame buffer contents, just the monitor output.
However you generate that table is your choice.
If you need to modyfy the pixel data itself, write a fragment shader.