[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: xearth 1.0: fatal - unable to allocate enough colors



On Fri, 13 Nov 1998, Shaleh wrote:

> In X Windows programming, each app asks for a colormap.  If one app asks for a
> large colormap, the window manager doles out whatever is left to everyone else.
>  Netscape is also a big offender here.

 Yup. With only 256 colors, you're kind of limited. Some applications can
"install a private colormap", which means that they handle allocating
their own colors that don't match what everyone else is doing. The problem
is that when the mouse is outside the apps' window, the apps' colors look
strange. Then when the mouse is in the window, everything *else* looks
strange but the app looks normal. I think the option for Netscape is
'-cmap' or '-private' or something like that. Maybe GNOME has such an
option.

 It doesn't look as cool, but you can force xearth to use fewer colors...

> > I have the same problems even if the only thing I have running is gnome
> > panel. I wish this issue can be investigated thouroughly because the
> > colormap problem is not so rife on Windows and it seem sto be a huge thing
> > on Linux. The same applies to fonts by the way. Does this has anything to
> > do with Linux or is it the video card problem? 

 The reason it's not such a big problem in Windows is that Windows
reserves the first few colors in each colormap and sets 'system default'
colors in there, and applications have to go through a lot of hoops to
change that. Most don't, so they end up all using the same colors.

 In the Linux world, such undemocratic behavior would never fly. Apps are
allowed to do what they want with the colormap. Hence there is more
colormap contention.

 If at all possible, I'd suggest going to 15 or 16-bit color. How much RAM
do you have on your video card? Sometimes there are tricks you can play.
I've got 2MB, but I can run X in 1152x864@16bpp and use just about all of
the memory...
 
 Sincerely,

 Ray Ingles       (248) 377-7735       ray.ingles@fanucrobotics.com
   "No one - I repeat, no one - is making money on the Web. Yet."
                       Steve Deyo, 1995


Reply to: