Mail Archives: djgpp/1996/12/30/18:35:09
[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 -