Page 1 of 1

light weight graphic library

Posted: Mon Jun 09, 2008 10:12 am
by mcheung63
Hi
Any light weight graphical library work with linear framebuffer?
thanks
from Peter ([email protected])

Posted: Mon Jun 09, 2008 12:37 pm
by svdmeer
Maybe you can check svgalib.

It wouldn't be hard to write some functions by yourself.

Posted: Mon Jun 09, 2008 1:43 pm
by lukem95
the basic ones are easy, and it's even easy to optimise them.

some useful resources:
the Wiki
FreeVGA (google it)
http://www.brackeen.com/vga/

Posted: Mon Jun 09, 2008 2:23 pm
by Combuster
Apart from svgalib all the pointers assume that you actually plan on writing your own functions. I have no experience with svgalib, but I'd guess I'd be faster off writing my own code rather than porting some library i've never used. If you're unfamiliar with all the math included, then porting may be the better option.

Apart from that, writing your own is IMO always a good exercise even if its the slower route.
Let me point you you to Michael Abrash' graphics programming black book, which contains both working code and explanations, from plotting pixels to writing 3D renderers. Best thing is, you can download a copy for free :wink:

Edit: there's graphics code in my OS' code base, if you want to translate from basic you can have a go at that. It's mostly VGA oriented though.