Archived

This topic is now archived and is closed to further replies.

jsmawais

Semi-Transparent blitting

Recommended Posts

Trust me when I say this. Seriosuly, I am talking from experience:
Do not even attempt to do this in DirectDraw.
What you are looking for is called alpha-blending. Search the DirectX forum with these keywords - alpha-blending directdraw transparencey - and you will see exactly why after reading a few topics. Trust me. Do not try alpha-blending in DD it will just piss you off. If you really need it you will need to use Direct3D.

Share this post


Link to post
Share on other sites
Color-keying and alpha blending are completely different things.
Color-key masks off pixels based on the mask color, while alpha blending literally "blends" the source and destination pixels by the alpha factor.

Colorkeying is entirely possible in hardware with ddraw, and sdk does explain how to use it.

On the other hand, hardware color keying isn''t available anymore in d3d, while AB is.

-Nik

Share this post


Link to post
Share on other sites
OMG sorry I think I may have misunderstood your question. I thought you wanted to do a semi-transperent pixel effect, and you thought that color-keying might be used to do this. Re-reading the original post, I now understand that you infact want to blit images that have trasparent areas (such as a trasparent background behind a character)?

Share this post


Link to post
Share on other sites