[SDL] SDL with MFC MDI?

Robert H. Oujesky roujesky at mail.neuralog.com
Thu Jan 16 08:20:03 PST 2003


On Fri, 2002-12-20 at 15:00, Adilson Oliveira wrote:
> Hi.
> 
> I'm developping an apication and the sprites I have to use has an 
> anti-aliasing effect. When I blit them on the background surface, I got 
> an ugly border because of the transparecy.
> Any ideias how to have transparency on anti-aliased images? Is an alpha 
> channel the solution? If so, how?

Alpha channels are certainly 'a' solution, and probably the simplest if
not the most efficient.  Just changing your base files to png's that are
anti-aliased against a transparent background and using those instead of
whatever format you're currently using might be enough, unless you're
forcing the surface formats to match the display.

An important thing to remember though is that if you're using hardware
surfaces you'll no longer be using hardware accelerated blits if you add
an alpha channel.  99.999% of cards (none that I know of) don't have 2D
alpha acceleration, so everything will be done in software.  This could
lead to a HUGE loss of fps.

The only other option I know of would be to use OpenGL or to clean up
your art so the aliasing isn't as apparent.

> 
> TIA
> 
> Adilson.
> 
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
-- 
Jimmy <jimmy at jimmysworld.org>
Jimmy's World.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030102/d3f0ac90/attachment-0008.pgp>


More information about the SDL mailing list