Jacob (=Jouk) Jansen wrote: > [EMAIL PROTECTED] wrote on 20-SEP-2006 17:16:47.82 > > >>Jacob (=Jouk) Jansen wrote: >> >>>Hi all, >>> >>>Today I changed the Default visual of my X-server to DirectColor visual. All >>>is >>>fine except that all objects drawn by Mesa get weird colours. >>>I suspect that DirectColor-visuals is not working properly in Mesa. >>>Would it be easy to fix? >> >>With DirectColor you have to be sure to initialize the red, green and >>blue lookup tables (colormaps) to the suitable values (usually a >>linear ramp). >> >>Setting up the X colormap is outside the scope of OpenGL/Mesa and is >>the responsibility of the app or GUI toolkit. >> >>Are you using GLUT? GLUT should be taking care of that. > > Yes and No: > -The demos from progs/demo use glut (I tested gears and texcyl) > -xlockmore does not use glut. It sets up the colour tables correctly for > all modes, except for the GL-modes. In the latter case still he TrueColor > tables-entreis are tried. > > > Is a specification available what colour table Mesa is expecting?
For a 24-bit DirectColor visual, each of the R, G, B maps should be setup so that lookup[k] = k. It looks like glut was lacking that code, so I just added it. Try the current CVS code. > The 8-bit variant with writeable colours (PseudoColor) is working perfectly. OK. -Brian ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
