[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GS Back xlib on 8Bit display
From: |
Andreas Schik |
Subject: |
Re: GS Back xlib on 8Bit display |
Date: |
Wed, 13 Jun 2012 09:42:11 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 |
Hello Sebastian,
On 09.06.2012 12:25, Sebastian Reitenbach wrote:
> Hi,
>
> I got GNUstep up and running on a Tadpole Sparcbook 3GX under OpenBSD ;)
> Riccardo recommended me to use the xlib graphics backend.
>
> Generally it seems to be all fine, besides a little bit slow. Since its only 8
> Bit display, colors sometimes look a bit weirdo ;)
>
> When applications are starting, I see the following warning on the console:
>
> WARNING - XGServer is unable to use the fast algorithm for writing to an 8-bit
> display on this host - the most likely reason being the StandardColormap
> RGB_BEST_MAP has not been installed.
>
> My hope is when I can get rid of the warning, then colors may look a bit
> better,
> and maybe if it then uses the "fast algorithm" things may feel faster on that
> box.
>
> Googling for the RGB_BEST_MAP, I found its related to xlib, but what exactly,
> and how to install it, its not clear to me.
> I hope someone has a cluestick and can point me into the right direction.
I am not too deep into X11 programming, but will try to explain at least
a bit. RGB_BEST_MAP is the name of an X11 atom pointing to the "best"
color map for the current screen. This map is needed to quickly map
floating point RGB values into 8-bit RGB for your display. If it is not
present, this "fast" alogorithm cannot be used. The question is, where
to get the color map.
For this purpose, you usually have a tool called xstdcmap, that can be
run during startup (e.g. from .xsession) and which sets up the standard
color maps. Obviously this is not the case on your system. Either this
tool does not exist on SPARC or it simply is not run.
Another option would be to make the xlib backend create the color map if
it is not already defined. in back/x11/context.c you find the code, that
tries to detect the color maps. In this part, the "best" map could be
created if there cannot be found a proper one.
If you really want to do that, I suggest you grab yourself a copy of an
Xlib programming manual. I usually study the book by A. Nye ("Xlib
Programming Manual"). This book can be found online as PDF and contains
a rather detailed example of how to do that. It is a bit old, though,
but not many basic things (if any) have changed since then.
--
Grüße / Cheers
Andreas Schik
signature.asc
Description: OpenPGP digital signature