Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Drastick

3DXSprite draw, can I change the opacity of the texture I'm drawing?

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

OK, I'm using the 3DXSprite draw with a texture (that may or may not already have transparency) but what I want to do is change the opacity of texture when it is drawn so I can make the image fade in and out. Is there a way to change the opacity of the texture or way to do what I want. -Thanks [edited by - Drastick on March 2, 2003 4:23:20 AM]

Share this post


Link to post
Share on other sites
Advertisement
For the last parameter of the Draw() method of D3DXPSRITE, you have a D3DCOLOR (DWORD) value. Pass an RGBA color with a lower alpha value and turn on alpha blending.

Share this post


Link to post
Share on other sites
Ok, I seems to work. So the hex value range for the opacity would be from 0xFFFFFFFF (0%) to 0x0FFFFFFF (100%) right. So how about a away to convert 0 to 1 to an opacity value in hex. Or do I need to get created and do it myself

Share this post


Link to post
Share on other sites

  • 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!