KMS Frame Buffer How To

D

dman777

If I want to use terminal 2D graphics in my C programs using KMS, where can I find tutorials or find out how to incorporate/write KMS in my C programs?
 
J

Johann Klammer

Good question. There does not seem to be a sane, portable way to use the
framebuffer. There's /usr/include/linux/fb.h for the (pure)console. I do
not know what to use in xterm. You could use xlib xcb or the dga
extension(the latter full-screen only, but the faster of the three). You
could use one of the higher level libraries (libdirectfb or sdl being
popular). They are a little more complex, so your chances to run into
incompatibilities or brokenness with some bleeding-edge distro is a bit
higher...

I have absolutely no idea if any actual modesetting works by now for
things like the VESAFB kernel module(I assume it does not).

AFAIK The excellent w3m-img web browser does HTML rendering(+images) in
both X and console, so you might want to look at that(read the source).
But the code is just plain ugly.

Good Luck, you will need it...
 
D

dman777

Good question. There does not seem to be a sane, portable way to use the

framebuffer. There's /usr/include/linux/fb.h for the (pure)console. I do

not know what to use in xterm. You could use xlib xcb or the dga

extension(the latter full-screen only, but the faster of the three). You

could use one of the higher level libraries (libdirectfb or sdl being

popular). They are a little more complex, so your chances to run into

incompatibilities or brokenness with some bleeding-edge distro is a bit

higher...



I have absolutely no idea if any actual modesetting works by now for

things like the VESAFB kernel module(I assume it does not).



AFAIK The excellent w3m-img web browser does HTML rendering(+images) in

both X and console, so you might want to look at that(read the source).

But the code is just plain ugly.



Good Luck, you will need it...


That drives me crazy I can not find anything on KMS for programming. I wonder for 2d graphics in putty as the terminal emulator if KMS technology makea difference anyways.

If I use the old school Vesa, would it be a sure way to know it would work on all recent(or 2 year oldish) Linux systems? I found this for it:
https://docs.google.com/viewer?a=v&...xUsiLT&sig=AHIEtbQMgihTVXDSl03-QUY1f4kuRAJKrw
 
J

Johann Klammer

dman777 said:
That drives me crazy I can not find anything on KMS for programming. I wonder for 2d graphics in putty as the terminal emulator if KMS technology make a difference anyways.
As far as I understand it, KMS is only for modesetting. not for any
actual drawing. The reason that there's been so much talk about it in
the last years, is that those things had been done inside the X server
(userspace) before but have been moved to the linux kernel drivers
afterwards.

Putty is a ssh client. Heck, I already get problems trying to use the
linedrawing characters with it. It will not do any
framebuffer(=pixel-wise) drawing.
If I use the old school Vesa, would it be a sure way to know it would work on all recent(or 2 year oldish) Linux systems? I found this for it:
https://docs.google.com/viewer?a=v&...xUsiLT&sig=AHIEtbQMgihTVXDSl03-QUY1f4kuRAJKrw

I am not even sure if they _do_ still have a BIOS int 10h with all the
UEFI and closed source firmarez(big doubts). You'll have to use the
appropriate library/kernel header... fortunately there are so many to
choose from...

That's all I know(half-knowledge, that is). Try the documentation for
the packages mentioned earlier. Also, you could try one of the more
Linux-centric newsgroups (uk.comp.os.linux, comp.os.linux.misc,
comp.unix.programmer seem to be active).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top