From: ugordan AT mail DOT geocities DOT com (Gordan Ugarkovic) Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro putpixel speed ? Date: Sat, 03 Jan 1998 19:03:57 GMT Organization: Croatian Post & Telecommunications Lines: 18 Distribution: world Message-ID: <34ae8980.886010@news.tel.hr> References: <01bd0879$62651a60$bf226ccb AT ashod> <19980103183600 DOT NAA13996 AT ladder02 DOT news DOT aol DOT com> NNTP-Posting-Host: ac37-p14-zg.tel.hr Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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