Re: [AD] Fw: Acquire/Release speed issue |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> I investigated in the issue and found why I didn't reuse the screen on
> first create_video_bitmap() call. Since we're emulating page flipping,
> there is no real page flip at all, as the video bitmaps are copied onto
> the real screen.
The Windows windowed driver also emulates page flipping, and it does reuse
the screen like the fullscreen one.
> With emulation how I did it, you have the real "screen" BITMAP, and each
> time you call create_video_bitmap(), it returns a new BITMAP. You draw into
> one of these, then show_video_bitmap() copies onto "screen". If I reuse
> the screen, this doesn't work, as with emulation "screen" is always
> displayed, no matter if you call show_video_bitmap() to flip pages...
The technique is to swap the underlying surfaces on each call to
show_video_bitmap():
Before: BITMAPs page1 == screen page2
| |
Surfaces surface1 surface2
Flip: the contents of surface2 are copied onto surface1, then surface1 is
attached to page2 and surface2 to page1
After: BITMAPs page2 == screen page1
| |
Surfaces surface1 surface2
--
Eric Botcazou