[SDL] SDL_SetGamma problem
f91-men at nada.kth.se
Wed Jun 13 02:08:17 PDT 2001
>xdpyinfo says 'default visual id: 0x23' which is TrueColor.
>Actually I don't know much about X11 and the theory behind these 'visuals'.
an X11 visual is a combination of depth and colour model, and determine how
X11 colormaps map pixel values to RGB colours on screen
>xdpyinfo lists DirectColor visuals with id 0x25 and 0x26.
>Is there a way to select the default visual (XF86Config??) and is this
there is usually a way but it won't make a difference in this case.
SDL uses an appropriate DirectColor visual for >8bpp modes if possible
>But the _important_ point is, that SDL_SetGamma() reports success although no
>visible effect happens. My game will handle both cases anyway (w/ + w/o gamma
>support). It just has to know about the (non-)existence of gamma support.
it could be a bug in the X server --- the best way of checking is to
write an xlib test app to verify it (create a DirectColor window, draw
something in it, and manipulate the colormap)
Make sure that your X11 window has focus, or the gamma change might not
take effect. Also try a different window manager, and running your
program in fullscreen
More information about the SDL