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


Transparency with TLVertex

Recommended Posts

im having a problem getting the green channel of my 24 bit bitmap becoming transparent. I''m almost positive it has to do with the way my settexturestagestate is set up. I''m using D3DXCreateTextureFromFileEx() and the green just turns black, any ideas? heres a little of my code: D3DXCreateTextureFromFileEx( g_pd3ddevice, "interior.bmp", 0, 0, 0, 0, D3DFMT_A1R5G5B5, D3DPOOL_MANAGED, D3DX_FILTER_TRIANGLE, D3DX_FILTER_TRIANGLE, D3DCOLOR_ARGB(255, 0, 255, 0), NULL, NULL, &g_ptexhud); and: g_pd3ddevice->SetTexture(0, g_ptexhud); g_pd3ddevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); g_pd3ddevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); g_pd3ddevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); g_pd3ddevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1); Thanks in advance

Share this post

Link to post
Share on other sites