Mail Archives: djgpp/1997/01/01/12:38:34
Shawn Hargreaves (Shawn AT talula DOT demon DOT co DOT uk) wrote:
: [Uzi Suicide] writes:
: >The result I got was 17fps using my own vbe 2.0 lib, and 7fps using
: >Allegro.
: 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
Exactly. :) It's just a case of testing specialised code against generic
code.
: inefficient for anything more than a single pixel, since it has all the
I was hoping to test a near-worst case rendering ... eg with an
unoptimised tmapper before implemention in asm and pipeline tricks ..
: 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
There's not much difference. Perhaps just a couple of frames behind, but
again it can be due to it's having to cope with special cases to
maintain generality.
: still much difference between that and your code, please send me your
: code so I can see where I'm going wrong! :-)
No, there's nothing wrong with Allegro's code. In fact I think it's quite
well written. :) It's fantastic for creating apps fast and I regret I
havn't discovered it earlier (not to mention support for many video
cards), having spent months writing my own low-level libs instead of
focussing on creating my apps (here's some advice for budding game-writers
.. ;)
- Raw text -