Mail Archives: djgpp/2000/07/05/18:15:12
> >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.
> <jump to 2nd message>
> >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.
- Raw text -