Mail Archives: djgpp/1998/01/03/15:18:09
On 3 Jan 1998 18:36:14 GMT, swarsmatt AT aol DOT com (SWars Matt) wrote:
>Ashod wrote
>:>test2() seems to run much faster than test1 ( sure its direct, but
>>allegro seems to use its putpixel for other functions too, isnt
>>that a tad bit slow ? )
>
>I think the putpixel function performs clipping (it checks that the coordinates
>you give it are inside the screen), which makes it slower.
Speaking of clipping, you can use Allegro's _putpixel() function
instead of regular putpixel(). It's much faster because it's
implemented in inline asm and it doesn't perform clipping, and it can
crash your program if you try drawing outside the bitmap. And another
thing: _putpixel() won't work in TrueColor and Mode-X video modes. For
more info, look into the Allegro documentation.
Gordan Ugarkovic
ugordan AT yahoo DOT com
- Raw text -