Sign in to follow this  
dai_zeng

HOW CAN I GET TRANSPARENT SPIRIT WITH ONLY DDRAW

Recommended Posts

I FIND IT HARD!INTERFACE DDRAW7 DOSN'T HAVE SUCH A BLT FUNCTION!WHAT SHOULD I DO WITH IT?HELP ME,PLEASE!I CAN DO IT WITH ONLY DDRAW,NO D3D & OPENGL.

Share this post


Link to post
Share on other sites
Firstly, please don't type in caps since it feels like you are shouting and it is far to early in the morning here in the UK for that.

Secondly, if you type "DirectDraw transparent sprite" into Google, the very first link that appears is this.

You use the existing Blt or BltFast methods but you first need to set up a surface colour key on the source surface and then pass Blt or BltFast flags to tell them to use the source colour key.

HTH

Share this post


Link to post
Share on other sites
Why don't you want to use D3D or OpenGL? DirectDraw has no harware support for transparacy, translucancy, rotation or scaling. It can do colour keying, but I don't think that's supported in hardware by a lot of cards, so you're likely to get pretty poor performance. If you want translucancy (semi-transparant sprites) or rotation, you'll have to lock the backbuffer and the sprite surface, and manually do the blending or rotation yourself, which isn't trivial (for rotation in particular).

Another alternative is SDL, which uses DirectDraw internally on Windows anyway, and it has several add-ons for doing rotation, scaling, etc

Share this post


Link to post
Share on other sites
appologise for my abrupt shouting word,and vagueness...il improve my expression:)
thank everyone helped.the semi-transparent evilsteve refers is helpful.
and imnot a buddhist.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this