Jump to content
  • Advertisement
Sign in to follow this  
gangliu

help, Surface to surface with transparency(not texture)

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

hello all: In my D3D9 code, I have two surfaces. Can I copy one to another with transparency(without texture). I use D3DXLoadSurfaceFromFile ,but failed. The transparent color is filled by black color. Can you give me any advice? thanks all.

Share this post


Link to post
Share on other sites
Advertisement
Not 100% sure what you mean by "without texture." One problem I noticed is that both surfaces have to have an alpha channel. ie, D3DFMT_A8R8G8B8 instead of D3DFMT_X8R8G8B8. Otherwise D3D will ignore the extra byte and it won't get copied / managed, even if you set it explicitly through locking and bit blitting.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!