c++ - GetDeviceGammaRamp to adjust colors -


I open an open application (c ++) overlay, this open application uses SetDeviceGammaRamp to set the brightness of the desktop.

Too much to know (why not know). This app is full screen and looks good, but my overlay is very bright. Instead of the orange color with normal brightness, I get yellow due to high gamma

What are your expectations? Get the gamma that is currently set (using GetDeviceGammaRamp), and then adjust the use of this color to set i. Like

; GlColor4f (R, G, B, A) becomes glColor4f (R / gamma, g / gamma, b / gamma, a);

So if the brightness of the desktop is very high, the rg and b will decrease the value (deep) and they will look like.

How can I do this? GetDeviceGammaRamp fills a table so how can I use it to modify my color?

Thanks

"itemprop =" text ">

You can be better than just using the ARB_framebuffer_sRGB extension if You can:

  #define GL_FRAMEBUFFER_SRGB 0x8DB9 // Already supportSRGB = (0 = strstr (4 *) glGetString bool can be defined (GL_EXTENSIONS), "GL_ARB_texture_non_power_of_two")) ; If (Support SRGB) {glEnable (GL_FRAMEBUFFER_SRGB); }  

Comments