nanogui: Color display with microwin CVS version, nxlib 0.45, fltk-1.1.7
Subject:
Re: [nanogui] Color display with microwin CVS version, nxlib 0.45,
fltk-1.1.7
From:
Matteo Facchinetti ####@####.####
Date:
8 Jan 2008 12:55:56 -0000
Message-Id: <478372DF.3070405@sirius-es.it>
Hi Thomas,
>
>
> Where I could find some information about the palette?
A way is to open fb driver code in your kernel:
in s1d13xxxfb_set_par() function there's a switch that initialize the
hw of your video card.
In case of 8bpp, this card works in "pseudo color"; this mean that it
use a hw palette.
> Normally I
>
> use as explained for framebuffer MWPF_TRUECOLOR0888.
OK, because nano-x when works with framebuffer ask to kernel the hw
config of your video card.
In this case, your videocard works in FB_VISUAL_PSEUDOCOLOR and then
set-up the 256 system color palette.
The problem is that Fltk+nxlib+nanox system works only in TrueColor
because in
nxlib it's not implemented the possibility to convert the
palette index <=> color value
for images.
For solve this problem I make a "brutal" hack....
1 - I compile FTLK with enable USE_COLORMAP in config.h
2 - I apply a patch that force FLTK to pass its internal index palette
to nano-x.
3 - I replace nano-x system palette with FLTK palette applying an other
patch.
The result is that nano-x now works only with FLTK but Image colors are
good.
This isn't a right solution of the problem... but it works :-)
Is there anyone that can give me a feedback to suggest a better way?
or help me to develop the part needed for give the solution for this
problem?
I think that this feauture can be interesting for the project.
In attachment there are all patches to apply.
Regards,
Matteo Facchinetti
[Content type text/x-patch not shown. Download]
[Content type text/x-patch not shown. Download]
[Content type text/x-patch not shown. Download]