HOW CAN I GET TRANSPARENT SPIRIT WITH ONLY DDRAW

Started by
3 comments, last by dai_zeng 17 years, 5 months ago
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.
Advertisement
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
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
A transparent spirit, eh? You might want to give buddhism a try.
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.

This topic is closed to new replies.

Advertisement