Jump to content
  • Advertisement


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


Using D3DXCreateTextureFromFileEx to Create Transparent Textures

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

When I use D3DXCreateTextureFromFileEx to make the pink in my texture tranparent, it seem to be replaced with the non-transparent black from my mesh (a rectangle made from two triangles)? How can I get this to be transparent? My transparent color is (some form of pink): R=255 G=0 B=255 O=100% The following are the color keys that I have tried (Not sure if 100% is FF): 0xC8FF00FF 0xC7FF00FF 0xFFFF00FF 0x00FF00FF hr = D3DXCreateTextureFromFileEx(pd3dDevice, pCursorFile, 0,0, D3DX_DEFAULT, D3DPOOL_DEFAULT, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_FILTER_NONE, D3DX_FILTER_NONE, 0xC8FF00FF, NULL, NULL, &m_pCursorTex);

Share this post

Link to post
Share on other sites

device->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
device->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA );

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!