Re: [AD] allegro on Solaris

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> > However, if Allegro grows more popular on UNIX workstations (it's a great
> > aid in visualization - I've used it several times already for displaying
> > numerical calculations), this may be something that has to be addressed.
> 
> It wouldn't be very useful for Allegro's target applications (games)
> though.  For drawing quick graphs, etc. then it would be useful.  I
> think it wouldn't be too hard.

It should be fairly easy to fix. The relevant code is in src/x/xwin.c, lines
383-391 (4.1.11WIP):

   /* Create and install colormap.  */
   if ((_xwin.visual->class == PseudoColor)
       || (_xwin.visual->class == GrayScale)
       || (_xwin.visual->class == DirectColor))
      _xwin.colormap = XCreateColormap(_xwin.display, _xwin.window, _xwin.visual, AllocAll);
   else
      _xwin.colormap = XCreateColormap(_xwin.display, _xwin.window, _xwin.visual, AllocNone);
   XSetWindowColormap(_xwin.display, _xwin.window, _xwin.colormap);
   XInstallColormap(_xwin.display, _xwin.colormap);

Removing the calls to XSetWindowColormap and XInstallColormap made Allegro
use the default colourmap, unfortunately with completely screwed colours.
I'll have to dig into the X11 documentation to figure out how to set things
up properly. If I can get this to work, adding a flag that can be set in the
config file might be a good way to change the default behavior. This should
be relatively painless.
As for it being useful in games, well, when my display doesn't flash if I'm
playing a game, that's a good thing, right? ;)

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/