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?---------------------------------
???
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 PendletonOn Sat, 2008-01-05 at 14:50 +0800, Mxdyd wrote:
???
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 +
±-------------------------------------+
Usually, although displays advertise an accuracy of 18bpp, they are driven
either in 16bpp mode or in 24/32bpp mode, and the hw does the conversion
(likewise, a fair amount of flat panels are actually 18bpp in accuracy, and
do the 16->18 or 24->18 conversion on hardware). Are you sure your hw
exposes 18 bpp and not the more standard 16/24/32 ? I have a hard time
believing that.
StephaneOn 1/5/08, Mxdyd wrote:
Hello,
I’m trying to port the libsdl onto arm-linux,but my LCD is 18bpp.Howcan I make it support 18bpp?Which file should I modify?