www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/30/18:35:09

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Which is faster? Allegro or Sandmann's LFB
Date: Mon, 30 Dec 1996 20:23:55 +0000
Organization: None
Lines: 24
Distribution: world
Message-ID: <csZE8NBbTCyyEwhh@talula.demon.co.uk>
References: <59s2q3$84l AT nuscc DOT nus DOT sg>
<19961226 DOT 230751 DOT 4975 DOT 3 DOT chambersb AT juno DOT com> <59v0p0$g3j AT nuscc DOT nus DOT sg>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

[Uzi Suicide] writes:
>I ported this to Allegro, using BITMAP *dbuffer, and putpixel to this
>dbuffer, etc.
>
>The result I got was 17fps using my own vbe 2.0 lib, and 7fps using
>Allegro.

There are a couple of things I'd like to point out with regard to that
result. While I won't dispute that highly specialised graphics code will
almost always be faster than a generic lib like Allegro, I don't think
your test was showing Allegro at it's best. Calling putpixel() is very
inefficient for anything more than a single pixel, since it has all the
overhead of a function call, clipping, checking for xor and patterned
draw modes, etc. The _putpixel() function cuts out most of this, but
still has the overhead of supporting bank switching for non-lfb svga
cards. If all you are doing is plotting single pixels to a memory
buffer, try a direct write with dbuffer->line[y][x] = color. If there is
still much difference between that and your code, please send me your
code so I can see where I'm going wrong! :-)

/*
 *  Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
 *  Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'.
 */

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019