www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/01/12:02:32

Message-ID: <D1FB30BBA491D1118E6D006097BCAE391FF4E4@Probe-nt-2a.Probe.co.uk>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Allegro HiColor: 15 or 16 bit?
Date: Wed, 1 Apr 1998 18:01:12 +0100
MIME-Version: 1.0

Rylan writes:
> I have a question for you guys: Which hicolor mode will be the best 
> choice under Allegro? Does 15 bit offer a speed advantage over 16 bit,

> or is 16 bit faster, since it seems transfers can be done in double 
> dwords? Does 15 bit images take significantly less storage space than 
> 16 bit images?

There is no difference in the drawing speed or memory requirements,
because both color depths use a 16 bit word for each pixel. In a 16
bit mode this is divided into 5 bits of red, 5 bits of blue, and 6
bits of green, while a 15 bit resolution uses only 5 bits for each
color and one bit is left unused.

It makes sense to use a 16 bit mode whenever possible, because you get 
more colors, but the difference between the two is usually very subtle.
Most cards support either color depth, but some are only capable of
one format. This means you need to support both if you want your 
program to run on a wide range of machines: that isn't hard to do
because Allegro will automatically convert all your graphics into the
current format when you load them (for details of this process, look
up the set_color_conversion() function in the docs).

	Shawn Hargreaves.

- Raw text -


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