Jump to content
  • Advertisement

Archived

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

corrington_j

directX 9, 2d transparent sprites

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

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

Color
[in] D3DCOLOR type. The color and alpha channels are modulated by this value. A value of 0xFFFFFFFF maintains the original source color and alpha data. Use the D3DCOLOR_RGBA macro to help generate this color.


The first byte is the alpha value, so 0x7FFFFFFF would be half transparent.

Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Hey I just read the post and wounder could you use clear spirits over a map to store terrain info

Share this post


Link to post
Share on other sites
To add to Drunken Hyena''s post, you have to specify D3DXSPRITE_ALPHABLEND as a parameter to BeginDraw() before calling Draw().

Share this post


Link to post
Share on other sites
quote:
Original post by miket
Hey I just read the post and wounder could you use clear spirits over a map to store terrain info


Why would you want to store terrain info in a sprite? Just store it in a structure that won''t be rendered at all.

Stay Casual,

Ken
Drunken Hyena

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!