[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interested in starting some basic development

>> Where's a good place to start? I feel that if I start working with an
>> existing API, I won't really have a good understanding of what's
>> at the hardware level.
Whether valid or not, I had the same feeling.  What I did was use the new
frame buffer console (fbcon) in linux.  It allows you to directly mmap
video memory from the linux console.  Upside is that is seems to be very
fast and easy to understand.  Downside is that it requires a development
kernel and a limited number of video cards with a limited number of
resolutions are supported.  To me, this seems to be where graphics on linux
are headed.  Anyone else out there have comments on fbcon?


fbcon code would look something like this:
/* open display and map video memory */
     struct fb_fix_screeninfo fix;

     ioctl(its_display, FBIOGET_FSCREENINFO, &fix);
     display_mem=mmap(NULL,SCREEN_SIZE,PROT_READ | PROT_WRITE,
/* set color map */
     struct fb_cmap cmap;
     short unsigned int red[MAX_COLORS];
     short unsigned int green[MAX_COLORS];
     short unsigned int blue[MAX_COLORS];

     ioctl(its_display, FBIOPUTCMAP, &cmap);