Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > KMS Frame Buffer How To

Reply
Thread Tools

KMS Frame Buffer How To

 
 
dman777
Guest
Posts: n/a
 
      02-02-2013
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?
 
Reply With Quote
 
 
 
 
Johann Klammer
Guest
Posts: n/a
 
      02-02-2013
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...
 
Reply With Quote
 
 
 
 
dman777
Guest
Posts: n/a
 
      02-04-2013
On Saturday, February 2, 2013 12:21:18 AM UTC-8, Johann Klammer wrote:
> 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&q...QUY1f4kuRAJKrw

 
Reply With Quote
 
Johann Klammer
Guest
Posts: n/a
 
      02-04-2013
dman777 wrote:
>
> 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&q...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).

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Console Frame Buffer Graphics with Kernel Mode Setting(KMS) in C Progams darin.hensley@gmail.com C Programming 1 11-22-2011 01:21 PM
Systems can be 1-3 kms apart; 1 or multiple LANs? qazmlp1209@rediffmail.com Cisco 4 04-03-2007 01:19 AM
Exchange 2000 with CA or KMS Miha Microsoft Certification 1 07-14-2005 11:34 PM
How to know the buffer size and increase buffer size in c++ Raja C++ 12 06-21-2004 06:21 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57