Alex Holkner wrote: > On 12/29/07, Martin Spacek <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> Is it possible to set the display, screen, and/or window gamma in >> pyglet? I'm looking for something similar to pygame.display.set_gamma >> and pygame.display.set_gamma_ramp. Here are their docstrings: >> > > Not in pyglet, but reasonably recent OpenGL drivers have extensions > (or support the corresponding GL version) for gamma correction; for > example, by providing sRGB texture and framebuffer formats. I believe > the latest nVidia drivers for 8xxx series have quite good support for > remapping colour space to an arbitrary function. > > For widest compatibility you can write a simple post-process fragment > shader to remap colour, or write corrected values directly if you're > not blending. > > If all you're after is a simple full-screen fade in/out effect, as > gamma functions are often (ab)used for, drawing a an alpha-blended > full-screen coloured quad will be much simpler and more efficient, and > will work even on the oldest hardware. > I understand Martin's question to mean that he wants to modify the LUT used by the RAMDAC in the video card. The shader route, or anything that just alters what goes into the framebuffer, is probably not what he's after. Instead, he's after how the framebuffer is interpreted.
Digging through the SDL sources, it appears that for X11, the call is XStoreColors. For Windows, SetDeviceGammaRamp. For Mac OS X Quartz, it's CGSetDisplayTransferByTable. Hope that helps, Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
