ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hey Guys, Im working on a 2d Game Engine for embedded x86 Linux.
As size and efficiant use of resources is extrememly important, i have decided to use the vesafb frame buffer via its block device /dev/fb
excluding the need to X, SDL, or DirectFB.
Its currently in very early development - ( works my mmap'ing /dev/fb0, then memcpy'ing pixels line by line.
This is all working very nicely, except for the opviouse faults...
* Occasional Flickering...
* std-output overwriting the graphics.
* Blinking Cursor flickering in the top corner.
I need to know.....
1) How to page flip ( double buffering )
2) How to wait for Verticle sync
3) How to prevent Linux From writing text to the fbdev that im using.
4) What kernel source files provide the /dev/fb0 block device interface.
I Assume that the first two are done with ioctl's
However i cannot find any odumentation on how.
and i have no diea what so ever about how to implement number 3.
i have read the vesafb.c source code, however this does not appear to be the kernel source code that provides the /dev/fb0 block device, and so offers no information on ioctl codes.
Im affraid that i have never programmed outside of the X11 environment.. and so am a little lost at this level.
What doesnt help, is that most how-to's about frame buffers under linux were written a very long time ago, in the days of kernel 2.0.
Anyways... Thanks for any help / advice / links / code anyone can provide.
struct fb_fix_screeninfo fix;
struct fb_var_screeninfo var;
int DisplayIdx; //0=Buffer 0 1=Buffer 1
unsigned int FbSize;
//Ok, now we are in the vertical retrace
//Get the video into
ioctl(Fh_frbuff,FBIOGET_FSCREENINFO,&fix); //Fixed info
ioctl(Fh_frbuff,FBIOGET_VSCREENINFO,&var); //Variable info
FbSize=(var.xres*var.yres*var.bits_per_pixel)/8; //Get buffer size
var.yoffset=var.yres*DisplayIdx; //Pan the display to buffer 1