Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Double buffering and speed under Linux framebuffer

This thread is locked; no one can reply to it. rss feed Print
Double buffering and speed under Linux framebuffer
Ant Allen
Member #4,449
March 2004

I'm totally new to allegro. I intend running it on a Linux framebuffer, on a desktop x86 machine, and also on an embedded intel xscale arm platform.

How aware of the hardware will Allegro be? Specifically, the Xscale processor has page flipping in the hardware (I think). Will Allegro make use of this, or will it hang about doing bitblt data copying instructions instead? How much of this is handled by allegro, how much by linux, and how much by the xscale display driver?

I've not yet got allegro compiled for the arm but I am getting ever closer thanks to lots of assistance from a very helpful person on the sorgeforce mailing list! :D) I'm asking this question about double buffering now just so that I know what to expect later on.

Thanks
Ant

Kitty Cat
Member #2,815
October 2002
avatar

Allegro is lower level than that. You manipulate the screen update yourself. Allegro can tell you when page flipping is available, but you need to actually create the pages, and the code to flip between them. Just like if you want to do double buffering, you need to create the buffer, and blit it yourself.

It's not really that hard to do, and I'm sure someone could whip up some code to make such differences completely transparent to the rest of the program.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Mark Robson
Member #2,150
April 2002

I'm not familiar with the Linux framebuffer driver (although I've used the other Linux console drivers, and the DOS drivers which are relatively similar).

If it's anything like the DOS / SVGAlib drivers, then it might give you a virtual screen much bigger than the actual screen, then you can page flip by scrolling.

I'm not sure if when you do this, create_video_bitmap and show_video_bitmap actually do this automatically for you or not.

So in effect, you might have to create your own buffers by creating sub-bitmaps of "screen".

In any case, this is not difficult to do.

---

On a side note: you should probably attempt to get the Allegro test program working on your target platform to better assess its capabilities.

Mark

Go to: