swarm-support
[Top][All Lists]
Advanced

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

raisedEvent: resourceAvailability: Colors


From: Sven Thommesen
Subject: raisedEvent: resourceAvailability: Colors
Date: Mon, 01 Jul 1996 09:36:56 -0700

Manor,

sorry to appear like a terrier with a bone here, but your previous answer 
had me digging into what documentation I have as well as the Swarm code, 
and what I found was:

a) some graphics cards will deliver more than 8bpp for at least some 
resolutions; I can get 16bpp up to 1152x900, and 32bpp up to 800x600.

b) some Xwindows servers will support 16bpp and 32bpp; my XFree86_Mach64 
does.

c) what I do not know is whether X itself will allocate more than 256 
colors in a Colormap if the current mode is >8 bits per pixel ?

d) reading module "XColormap.h"and "XColormap.m" in Swarm, I find that 
this module has a hardcoded limitation of 256 colors in a color map! Not 
only is MAXCOLORS defined to equal 256, but the "Color" data type which 
carries the color# to be used by Swarm programmers is defined as an 
"unsigned char" (i.e. 8 bits).

So, the limitation on the number of available colors isn't just a 
function of my hardware ... 

Of course, Heatbugs does not attempt to allocate nearly as many as 256 
colors, so the error messages we see on the screen, which are produced by 
XColormap.h, must be due to Xwindows refusing to allocate the requested 
resource.

Changing XColormap to accommodate a larger color map (e.g. 64k colors 
max.) would not be a big deal, but would X cooperate? I don't have the X 
documentation to determine this. Is it possible to ask X what the current 
mode is and allocate a colormap sized accordingly? [Does Objective-C 
support conformant arrays?]

Or, reading between the lines in XColormap and elsewhere, is there a way 
to get X to give the Swarm app its own 'local' colormap, so that there 
would be available at least a clear 256 colors?

You can see how my 'spare time' was spent this weekend ... <grin>

--Sven


reply via email to

[Prev in Thread] Current Thread [Next in Thread]