Sign in to follow this  
31337noob

transparency?

Recommended Posts

I think you may be able to simply put a transparency channel into your spirte artwork and DirectX will automatically recognize the transparency and draw it as such. Make sure to have transparency turned on though.

Share this post


Link to post
Share on other sites
Quote:
Original post by DragonGeo2
I think you may be able to simply put a transparency channel into your spirte artwork and DirectX will automatically recognize the transparency and draw it as such. Make sure to have transparency turned on though.


i dont want it in my artwork. i want a function that will set the transparncey on the fly.

Share this post


Link to post
Share on other sites
by the way, i want to make the D3DXSPRITE transparencey increase or decrease by pushing buttons.

is it possible to make a spirte transparent?

Share this post


Link to post
Share on other sites
anyone?

i want to make the whole sprite 50% transparent not just one color.

i know that D3DMATRIAL9 has something called Diffuse.a which sets the transparancey.

but how can i use that toward a sprite???

Share this post


Link to post
Share on other sites

HRESULT Draw( LPDIRECT3DTEXTURE9 pTexture,
CONST RECT *pSrcRect,
CONST D3DXVECTOR3 *pCenter,
CONST D3DXVECTOR3 *pPosition,
D3DCOLOR Color
);

Set the alpha component of Color to a value between 0 and FF, leaving the RGB components at FF.

Share this post


Link to post
Share on other sites
Quote:
Original post by n0ob

HRESULT Draw( LPDIRECT3DTEXTURE9 pTexture,
CONST RECT *pSrcRect,
CONST D3DXVECTOR3 *pCenter,
CONST D3DXVECTOR3 *pPosition,
D3DCOLOR Color
);

Set the alpha component of Color to a value between 0 and FF, leaving the RGB components at FF.


Thank you friend. it worked. YAY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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