   Transperent bit
  I am using textured quads to produce a 2d game, and would like to know how to discard one colour in favour of a transperent section of bitmap.Ie, texture  quad to display a circle without the square around it. Have tried g_d3dDev->SetRenderState( D3DRS_ALPHABLENDENABLE , TRUE );  g_d3dDev->SetRenderState( D3DRS_SRCBLEND , D3DBLEND_SRCALPHA );  g_d3dDev->SetRenderState( D3DRS_DESTBLEND , D3DBLEND_DESTALPHA );which had promising effect to start, but it seems to make the whole image 50% tansperant, instead of just the one colour 100% transparent.Any help, links, suggestions welcome. Thanks...  
  Hello,You need to set the color key value in your texture when you create it.D3DXCreateTextureFromFileEx(m_pd3dDevice, Image, NULL,NULL,NULL,NULL,D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, D3DX_DEFAULT, D3DX_DEFAULT , 0xFFFF00FF, //colorkey valueNULL, NULL, &m_pPlayerTextures);This texture uses 255,0,255 as the transparancy color.PigHeaded  ;  if you mean something a little like this, HRESULT hr = D3DXCreateTextureFromResourceEx(g_d3dDev ,NULL ,MAKEINTRESOURCE(IDB_DUALH) ,0 ,0 ,1 ,0 ,D3DFMT_A8R8G8B8 ,D3DPOOL_MANAGED ,D3DX_FILTER_NONE ,D3DX_DEFAULT ,0xffff00ff ,NULL ,NULL ,&g_d3dDualH);I already had it. Right now I Clear(..) to a green background, and bounce 3 graphics on the screen. The magenta is transformed to an opaque black which means that (i guess) I need to do something else extra to make it dissappear?  ;  g_d3dDev->SetRenderState( D3DRS_SRCBLEND , D3DBLEND_SRCALPHA );g_d3dDev->SetRenderState( D3DRS_DESTBLEND , 3DBLEND_SRCINVALPHA );I think Or go with alphacompare, it''s faster if you don''t do other (real) blending...;  Anon was me.Shoulda been alphatesting. If hw supports it, try using that instead like this:if (m_d3dCaps.AlphaCmpCaps & D3DPCMPCAPS_GREATEREQUAL){m_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);m_pd3dDevice->SetRenderState(D3DRS_ALPHAREF,   0x00);m_pd3dDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATER);}  ;  These are the render state settings I use.// Set diffuse blending for alpha set in vertices.m_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE,   TRUE );m_pd3dDevice->SetRenderState( D3DRS_SRCBLEND,  D3DBLEND_SRCALPHA );m_pd3dDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );PigHeaded