Mail Archives: djgpp/1999/08/03/05:26:52
Amin Kharchi writes:
> I want to use the fast videomemory with pageflipping for my game:
>
> BITMAP *bmp;
> bmp = create_video_bitmap(640,480);
>
>If I draw a bitmap with draw_sprite(bmp, sprite, 0,0) in to the created
>videospace, the sprite will be shown on the screen... But why??? I don't
>have used the function show_video_bitmap(bmp)!
The first video bitmap that you create is the same as the screen memory
that is initially being displayed. You need to make two video bitmaps
and flip back and forth between them, in order to be drawing onto a
hidden surface.
> How could this possible and how I must use this video_bitmap-functions
> correctly?
>
> And I have a loop for the draw_sprite() and its flickering, with
> show_video_bitmap() and vsync() it's not better.
Several of the example programs show how to do this kind of thing:
have a look at exflip.c and exupdate.c (if you have the latest WIP
version: they had numeric names in the 3.11 library).
Shawn Hargreaves.
- Raw text -