• Advertisement
Sign in to follow this  

DirectDraw Translucent Surface??

This topic is 4911 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

I'm trying to create a translucent surface in my DirectDraw application. I've already got Transparacy done (With DrawFastFlags.SourceColorKey) but i have no idea how to go about Translucncy, and i cant find any examples on the net, if anyone can help please do! Cheers!

Share this post


Link to post
Share on other sites
Advertisement
I've never done DirectDraw myself, but I think I recall seeing mentioned multiple times that DirectDraw does not have any automatical alpha blending. You have to do it manually. Get access to the back buffer and the surface you want to draw, and manually calculate what the new pixels need to be by blending each pixel from the surface with each corresponding pixel on the back buffer. And I'm guessing that this can get slow if you do a lot of it.

Since you need it quickly, I believe this is your best shot. However, in later projects, you might consider moving to 3D APIs (Direct3D, er, DirectGraphics 8 and up, I mean; OpenGL, etcetera) for 2D games. You get access to really easy effects such as translucency, lighting, rotations and scaling, fancy effects such as pixel shaders, plus it's hardware accelerated, which DirectDraw isn't really, anymore (not that it really requires acceleration). It'll take a bit more learning, but many people here think it is definitely worth it, and I thoroughly agree.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement