Jump to content
  • Advertisement
Sign in to follow this  
gsakd8782

About the function SetColorKey() int DirectDraw

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

Recently,i found that the function SetColorKey() just doesn't work in the 32 bits mode,but it can work in 16 and 8 bits mode,how it comes to be? And when i create a OffSceenSurface,and want to draw some text on it,the result is that there's a mess on the sceen!I have used the function clear(),but it still does't work.It really confused me~~who can help me!

Share this post


Link to post
Share on other sites
Advertisement
You really shouldn't be using DirectDraw, there's very little support for it, and it's not hardware accelerated. It's far better to use D3D for 2D, then you get all sorts of stuff for free like rotation, transparency, etc.

I didn't even think DirectDraw supported colour keying in fact, and even if it does, I'm pretty sure it depends on the graphics card and drivers you have.

Unless you have an extremely good reason, I'd switch to D3D9.

Share this post


Link to post
Share on other sites
well,thx for your idea~,maybe DirectDraw is out now. Aha~.I'll try D3D after i finished my current 2D Demo,yes,i know the ID3DXSprite can deal with the 2D graphics.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!