From: "23yrold3yrold" Newsgroups: comp.os.msdos.djgpp References: <395e61e0_2 AT spamkiller DOT newsfeeds DOT com> <395fcb12_1 AT spamkiller DOT newsfeeds DOT com> <39622a8e DOT 1248934 AT news DOT wins DOT uva DOT nl> <39626821_2 AT spamkiller DOT newsfeeds DOT com> <39635adf DOT 1264089 AT news DOT wins DOT uva DOT nl> Subject: Re: Using (page-flipping) to speed up a program Date: Wed, 5 Jul 2000 09:13:23 -0500 Lines: 51 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 NNTP-Posting-Host: 64.4.89.41 Message-ID: <3963b310_1@spamkiller.newsfeeds.com> X-Trace: 5 Jul 2000 17:13:36 -0500, 64.4.89.41 X-Comments: This message was posted through Newsfeeds.com X-Comments2: IMPORTANT: Newsfeeds.com does not condone, nor support, spam or any illegal or copyrighted postings. X-Comments3: IMPORTANT: Under NO circumstances will postings containing illegal or copyrighted material through this service be tolerated!! X-Report: Please report illegal or inappropriate use to You may also use our online abuse reporting from: http://www.newsfeeds.com/abuseform.htm X-Abuse-Info: Please be sure to forward a copy of ALL headers, INCLUDING the body (DO NOT SEND ATTACHMENTS) Organization: Newsfeeds.com http://www.newsfeeds.com 73,000+ UNCENSORED Newsgroups. To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > >Originally I use AUTODETECT, but I'm unsure whether MODEX is my only option. > >I need 16-bit, but the way Allegro's docs read, triple-buffering is Mode-X > >exclusive. The only commands necessary to do triple-buffering it seems are > >request_scroll() and poll_scroll(), don't they work in other modes? > IIRC, triple buffering requires hardware support. The VGA provides > hardware support in Mode-X, but not all SVGA cards provide hardware > support for VESA modes (mine doesn't, for instance). Using VB/AF > drivers may solve this, I haven't tested it. > In general though, you shouldn't rely on triple-buffering to work in > VESA modes. > You could make your program so it can run in VESA if the hardware > supports it or in Mode-X if not. This may require a little work, but > it will increase the chance of your game working for more people. I played with the example program for triple-buffering that came with Allegro; I can AUTODETECT in 640 x 480, and although it does tri-buf, it won't display my sprites properly (they look like a huge mess of random pixels). I'll keep trying to get that or page-flipping to work. > >> >ship = get_rle_sprite(load_bitmap("Ship.bmp", pal)); > >> You still have the memory leak. > > > >I tried to fix it, how should I do it? > Do something like > BITMAP *bmp; > ... > bmp = load_bitmap("ship.bmp", pal); > ship = get_rle_sprite (bmp); > destroy_bitmap (bmp); Funny, when I tried it; I got a General Protection Fault. Must have done something wrong cause it works fine now (even a little faster). Thanks. > > >Triple-buffering seems to be the best way in terms of animation and > >speed, > For a scroller, I think you're right. I know you don't want to use > Mode-X, but it has hardware support for scrolling just in this manner. > >main question is whether triple-buffering is possible outside of Mode-X (I > >want 640 x 480 w/ 16-bit color.).? > Yes, but see my other remarks above. > > Regards, > > Evert Glebbeek.