Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE301545DBC@probe-2.acclaim-euro.net> From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: Allegro: videomemory with bitmaps + sprites Date: Tue, 3 Aug 1999 10:26:59 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain Reply-To: djgpp AT delorie DOT com 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.