Linear framebuffer documentation
From: Roger Leigh (${rleigh}_at_invalid.whinlatter.ukfsn.org.invalid)
Date: 06/26/05
- Next message: Ben Hutchings: "Re: Database applications in Linux"
- Previous message: Sean: "Re: Some soft GUI toolkit?"
- Next in thread: Otto Wyss: "Re: Linear framebuffer documentation"
- Reply: Otto Wyss: "Re: Linear framebuffer documentation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 26 Jun 2005 21:39:31 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi folks,
Does anyone know of any decent documentation for the Linux linear
framebuffer device?
The header <linux/fb.h> isn't detailed enough to understand what
everything means, and I haven't found any decent examples of its use.
None of the examples I've found in FAQs/HOWTOs show how to use it
portably.
All I want to do is draw FreeType-rendered graymaps (or RGB rasters
for LCDs). However, it's not at all clear how to do this portably,
since you have to cope with all the available bit depths and pixel
colour formats. When you add endianness into the equation, it becomes
even more difficult...
fb_var_screeninfo gives all the necessary info (resolution, colour
depth, colour bitfields, bits-per-pixel, and bitfield endianness), but
there's a severe lack of working examples for this. The only question
I have is, how do I /portably/ paint an RGB colour to a given x/y
coordinate!
SDL does use it, but the code isn't too understandable because it
hooks into all the SDL internals.
One real weirdness: My code does have endianness issues. It worked
fine on i386-linux, but is horrible on ppc (I hardcoded the bitfields,
rather than use the variable info--all the examples do this!). This
is because the colour bitfields are all swapped. However... I run X
under FBDev, and if I run the program under X, it draws perfectly,
even though it fails on the console. Any ideas why? (The variable
info is AFAICT identical, including the bitfield endianness).
Thanks,
Roger
- --
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFCvxKCVcFcaSW/uEgRAjClAKDd2/wb34IYv2DEN2C92R2MwRmTjgCgoL5r
EdVXcy/5z5QWlBncpLM1pdU=
=7iJG
-----END PGP SIGNATURE-----
- Next message: Ben Hutchings: "Re: Database applications in Linux"
- Previous message: Sean: "Re: Some soft GUI toolkit?"
- Next in thread: Otto Wyss: "Re: Linear framebuffer documentation"
- Reply: Otto Wyss: "Re: Linear framebuffer documentation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]