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

Started by
2 comments, last by Drastick 21 years, 1 month ago
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]
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.
GraphicsWare|RenderTechhttp://www.graphicsware.com3D Graphics & Solutions
An old post by me. Uses managed DirectX though. Shows how to set a transparent color and alpha blending.

[edited by - FieroAddict on March 2, 2003 12:10:13 PM]
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

This topic is closed to new replies.

Advertisement