Archived

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

DirectX9.DirectDraw (C#) Transparency

This topic is 4945 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have a surface with a black background that I would like to make transparent. How do I do this with C# and DirectX9.DirectDraw? Thanks. btw, this is how I setup the surfaces...
SurfaceDescription desc = new SurfaceDescription();
desc.Width = sWidth;
desc.Height = sHeight;
for(int i = 0; i < mySurfaces.Length; i++)
	mySurfaces = new Surface(mySurfacesPath + myPrefix + i + ".bmp", desc, dev);
  
<- My Site -> "Discipline is my sword, faith is my shield do not dive into uncertainty, and you may live to reap the rewards" - (Unreal Championship) [edited by - Krisc on May 29, 2004 3:31:32 PM]

Share this post


Link to post
Share on other sites
Nevermind I found what I was looking for...:


ColorKey ck = new ColorKey();

// and then...

mySurfaces.SetColorKey(ColorKeyFlags.SourceDraw, ck);


<- My Site ->
"Discipline is my sword, faith is my shield
do not dive into uncertainty, and you may live to reap the rewards" - (Unreal Championship)

Share this post


Link to post
Share on other sites