delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/03/16:48:05

From: "DeHackEd" <dehacked72 AT nospam DOT hotmail DOT com>
References: <01bd0879$62651a60$bf226ccb AT ashod>
Subject: Re: Allegro putpixel speed ?
Date: Sat, 3 Jan 1998 16:25:20 -0500
Lines: 47
Message-ID: <Ov0Jv3IG9GA.222@upnetnews02.moswest.msn.net>
Newsgroups: comp.os.msdos.djgpp
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

This is true, but putpixel is suppose to be universal. It automaticly checks
what type of bitmap you are using, (linear vs. mode-x is a major difference) and
if you are drawing off the edge of the picture. This does slow it down a bit,
but if your bitmap were less than 100x100, test2 would probably cause a gpf
(general protection fault).

--
"DeHackEd"
Remove "nospam." from my email address to reply.
It's too late to run when you hear the boom.


Ashod wrote in message <01bd0879$62651a60$bf226ccb AT ashod>...
>
>take this for example  // in 8 bit 640 x 480
>
>void test (void)
>
>{
>int x;
>
>for(x=0;x<100;x++)
> {
> putpixel(abmp,x,x,x);
>}
>}
>
>void test2 (void)
>
>{
>int x;
>
>for(x=0;x<100;x++)
> {
> abmp->line[x][x]=x;
>}
>}
>
>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 ? )
>
>Ashod
>
>


- Raw text -


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