[SDL] How to make libsdl support 18bpp?
Bob Pendleton
bob at pendleton.com
Sat Jan 5 07:57:39 PST 2008
On Sat, 2008-01-05 at 14:50 +0800, Mxdyd wrote:
> Hello,
> I'm trying to port the libsdl onto arm-linux,but my LCD is
> 18bpp.How can I make it support 18bpp?Which file should I
> modify?
You are talking about a pretty big project. But, to get started down
load the SDL source and grep -iR bpp * to find all the files that
mention bpp (bits per pixel). Read all the ones in the include directory
and take a look at all the ones in src, especially those under
src/video.
That should get you started.
You might just want to find out if your display can be set to a 16 or 15
bit mode and use it in that mode. Or, you might be being fooled by an 18
bit display where the 6 bits of color are allocated in 8 bit bytes with
the low 2 bits ignored, in which case you can use the 24 bit modes with
much less modification.
18 bits per pixel is a very weird format. It almost always means that
the pixels are really mapped to memory on 8 bit boundaries with 2 bits
physically missing. So, read the hardware specifications very carefully
before you do any other work.
Bob Pendleton
>
>
> ______________________________________________________________________
> 雅虎邮箱传递新年祝福,个性贺卡送亲朋!
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
--
+--------------------------------------+
+ Bob Pendleton: writer and programmer +
+ email: Bob at Pendleton.com +
+ web: www.GameProgrammer.com +
+ www.Wise2Food.com +
+ nutrient info on 7,000+ common foods +
+--------------------------------------+
More information about the SDL
mailing list