Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: graphics (color query code for truecolor displays)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jun P. Furuse <Jun.Furuse@i...>
Subject: Re: graphics (color query code for truecolor displays)
Hi,

> I was excited to hear that the 2.02 graphics library
> had better support for 24 bit displays, but I can't
> get it to work properly.  Ideally, I'd like something like
> 
> set_color (rgb x y z)
> 
> to just work right, no matter how many times I call it. 
> The support in 2.02 looks like it only works for images
> (?), and even that doesn't seem to work properly on my
> machine; ocaml seems to think I have an eight bit
> display.  I've looked at the graphics code a bit, but
> I'm no X genius.

I am the one who added "fast colour look up code" in graph library.
Instead of the older version which communicates between X server 
for each colour query (and it is very inefficient), I intended to
compute its "colour index" in the client side. But this colour index
computation method is highly architecture dependent of X servers 
(bit order, colour model, bit depth, etc), and not well documented. 
We checked this modification work correctly for XFree86 servers with
16 bits depth and some DEC Alpha servers, but the code does not
support the all possibilities of architectures, I am afraid.

To do quick repair, use the patch following. This just disables
the new modification. Each color query creates communication between X
server and it REALLY slows the full color graphics programs, but at
least, it works correctly.

Regards,

-----------------------------------------------------------------------
Jun P. Furuse 					 Jun.Furuse@inria.fr
  INRIA
    Institut National de Recherche en Informatique et en Automatique