title: How to enable alpha blending on DirectX?
body: <p>How to do this in DirectX?</p>
  
  <pre><code>glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  glEnable(GL_BLEND);
  </code></pre>
  
  <p>Somehow i just cant seem to get it work. Im using code:</p>
  
  <pre><code>d3ddev-&gt;SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR);
  d3ddev-&gt;SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCCOLOR);
  d3ddev-&gt;SetRenderState(D3DRS_ALPHABLENDENABLE, 1);
  d3ddev-&gt;SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL);
  d3ddev-&gt;SetRenderState(D3DRS_ALPHAREF, (DWORD)50);
  d3ddev-&gt;SetRenderState(D3DRS_ALPHATESTENABLE, 1);
  </code></pre>
  
  <p>But it will render my polygon with some sort of ghosted method, i can see through all my polygons! i just want to make the texture with alpha channel to show through those fully transparent pieces of texture. this works with alphatest, but it still shows black edges, so i guess the blending isnt enabled, even though i have set D3DRS_ALPHABLENDENABLE ! What im doing wrong?</p>