Re: [AD] Triple Buffering under X?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Evert Glebbeek wrote:
On Saturday 04 September 2004 02:29, Chris wrote:

I'm not sure if this is a good idea. For one, X doesn't even really do page flipping (it just emulates it), so emulating a page flip method on top of an emulated page flip is just heading for trouble.

Well, I'm not sure that's going to be much more trouble really. It's not really true triple buffering though; just page flipping with an unused video page.

IIRC, the triple buffering methods will fall back to normal page flipping if triple buffering's not available (ie. poll_scroll will return 0 and request_video_bitmap will fall back to show_video_bitmap). The only difference is the flip happens in the background on vsync for triple buffering, while page flip waits for vsync then flips, stalling the main program while waiting.

Hmm... true. On the other hand, did that even work with X?

AFAIK, only with Mode-X under pure DOS.

I'm not sure how X handles this at all. I thought scrolling was a real possibility though? Or is that emulated as well?

It's possible with DGA, but X11 emulates it by having a memory bitmap the size of the virtual screen and offsets all the drawing operations when it writes to the display. A page flip is effectively just a memory->display blit operation (though it's faster than memory->memory->display which double buffering methods give, so it is useful).

It might be possible to do proper scrolling/flipping in fullscreen modes, though. But I don't know how extensive the XVidMode extension is. At the very least it would be limited to the max resolution X is configured for (if not your desktop resolution).

- Kitty Cat




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/