Re: [AD] show_video_bitmap() documentation a bit misleading...

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


On Wed, Jan 08, 2003 at 03:31:10AM -0500, Matt Witherspoon wrote:
> The function show_video_bitmap is a function that seems to pretty much
> directly correspond to a function in the Allegro graphics driver. So the
> graphics driver is responsible for how this function behaves... and the
> show_video_bitmap() in the DirectX driver tied to the vsync. However as I
> found out on the SVGALIB driver, it does not support video bitmaps. Thus (I
> assume or else it wouldn't work) Allegro provides a fallback emulation of
> the function show_video_bitmap(). However, this fallback does not wait for
> the vsync. Even though the SVGALIB driver has a vsync() function that works,
> this fallback function does not make use of it. Therefore, we have a
> complete difference on the speed a program runs based on the Allegro
> graphics driver.

The point you make, show_video_bitmap() doesn't wait for vsync with SVGALIB
driver, is a good one, and it looks like a bug to me.
However, and I think this is in the docs, you should NEVER use vsync to
regulate the speed at which your program runs - it's bound to break sooner
or later. What if you can't fit your logic update code in one cycle? You'll
spend two cycles, effectively halfing your FPS where that is not nescessary.
You will also get different results on different hardware.

Evert




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