www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/21/12:50:46

Message-ID: <F77915E7F086D31197F4009027CC81C91CCA26@probe-2.as-london.acclaim.com>
From: Shawn Hargreaves <SHargreaves AT acclaimstudios DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Allegro: Translucency and Blending
Date: Fri, 21 Jan 2000 15:38:18 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

Night Walker writes:
> I must draw a translucent 8bpp bitmap on a 15/16/24/32bpp screen.
> Which functions I must call to create the trans table(s?)?

You can't, because Allegro doesn't support mixing color depths like 
that. See "info allegro converting" for a full explanation, but in 
brief, only the blit() function has full support for mixing different 
color depths (it's the workhorse routine used to convert between 
formats), while a few other routines have support for specific useful
and simple combinations, for example draw_sprite() is able to display
256 color source images on any format of destination. But in general,
mixing formats doesn't work, and should be avoided. The easy approach
is to convert all your images into the screen format while they are
being loaded: Allegro makes this very easy if you use the
set_color_conversion(), load_datafile(), and/or load_bitmap() calls.


	Shawn Hargreaves.

- Raw text -


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