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

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


> -----Oorspronkelijk bericht-----
> Van: alleg-developers-admin@xxxxxxxxxx
> [mailto:alleg-developers-admin@xxxxxxxxxx Eric
> Botcazou
> Verzonden: woensdag 19 februari 2003 18:46
> Aan: alleg-developers@xxxxxxxxxx
> Onderwerp: Re: [AD] BUG: Page flipping and the screen
>
>
> > _I_ know, but the GUI routines don't.
>
> Yes, this is a big limitation of the GUI engine. It ought to be
> fixed on the
> GUI side though.

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).

Fixing this on the GUI side would be rather hackish.

"How about a function that returns the currently visible page?"

With this remark I didn't meant a function that returns the last bitmap
passed to show_video_bitmap. It could be, but it could also be the screen
(in case of block copying eg).

> > Also when block-copying in windowed modes, the front buffer
> isn't showing,
> > but the screen bitmap.
>
> Are you speaking of the bug your testcase exhibits or of something else ?

No, this is something different :(

This is a problem introduced by the block-copying.
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.

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.

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.)

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'.

This obviously isn't nice, especially since there is no way telling where I
should draw to.





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