From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: ALLEGRO: 24 bit mode faster than 8 bit ??? Date: Wed, 24 Sep 1997 20:41:14 +0100 Organization: None Distribution: world Message-ID: References: <34285074 DOT 1316 AT cam DOT org> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 26 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Vic writes: >I got the latest WIP and I tried the color rainbows. >First of all I was surprised that 24 bit color was working-int the last >WIP it was not! This is good: it's nice when some of my bugfixes actually work :-) >second I was even more surprised to find out that 8 bit >was the slowest one, 15,16 even 24 bit modes were faster (going at a >constant speed). WHY?? This is just with the bit in test.exe that draws the color gradients, right? It does a little loop calling the HSV -> RGB conversion functions for each pixel, and then using makecol() to convert the resulting RGB value into a color that can actually be displayed. In a truecolor mode that conversion is just a couple of bit twiddling operations, but in a 256 color mode it has to search through the entire palette to find which color is closest to the one it really wants! This process can be sped up significantly by using an RGB_MAP lookup table: try doing one of the translucent drawing tests (to make the program build such a table) and then repeating the rainbow test... -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ Beauty is a French phonetic corruption of a short cloth neck ornament.