Re: [AD] BUG: Page flipping and the screen

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


> I don't think this should be fixed on the GUI side. I think allegro
> should maintain a bitmap which always points to the actually visible
> portion of the video memory (the portion that is sent to the monitor).

Maybe. But we would need to make sure that every single gfx driver comply 
with the semantics.

> Fixing this on the GUI side would be rather hackish.

Not much more than the first solution I suspect.

> In fullscreen mode, drawing to the front buffer immediatly shows on the
> monitor. Draw a line, and you'll see a line. This is the way it should be.
> With the block copying, the contents are not updated, until the next call
> to show_video_bitmap (to do the block-copy again). Unfortunatly the
> primary reason for drawing directly to the 'screen' is because we won't
> have to bother calling this function.

Do you have evidences of that? Anyway, I don't think we really support 
drawing onto the front page when page-flipping (but again, there is probably 
nothing in the docs that really prevents it).

> Drawing directly to the screen is possible by drawing on the screen
> bitmap, but this won't work in fullscreen mode, since screen isn't
> updated.

At least not with all gfx fullscreen drivers, yes.

> If I understood everything correctly, it does in the 4.1.x series, but
> from the following remarks I make up it will be discontinued:
>
> 	"The old way of page flipping (before the invention of
> 	create_video_bitmap()) was to use scroll_screen() and keep track of
> 	where to draw on the virtual screen.  So if the semantics of screen
> 	changes, I think it might break old programs."
>
> 	"But now, after your remark, it seems pretty clear that the feature
> 	would not be portable to the platforms with one flat surface of video
> 	memory so it probably doesn't matter after all."
>
> (Still I think it should update the screen bitmap, because
> show_video_bitmap and scroll_screen shouldn't be mixed.)

But show_video_bitmap() is only a wrapper for scroll_screen() for the gfx 
drivers with a single flat surface of video memory.

> To draw directly to the screen I now have to use two different methods: In
> fullscreen mode, write to front page, and in windowed mode write to
> 'screen'.

Why does writing directly to the front page in windowed mode not work? The 
windowed gfx drivers ought to have the same semantics as the fullscreen 
ones: the changes in the frontbuffer are automatically copied to the monitor
either after each group of drawing operations or periodically.

-- 
Eric Botcazou




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