About the function SetColorKey() int DirectDraw

Started by
1 comment, last by gsakd8782 14 years, 4 months ago
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!
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.
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.

This topic is closed to new replies.

Advertisement