   a problem of blend texture
  hiMy problem is itI have four texture and I draw map four times .this time I get the blend effect . now I pickup a trigon of map .I need it show red color.I set diffuse color is oxccff0000 when fifth draw map. but there are some error in it .it is not red .it is black. could you tell me way it is black? thank you .my code is it device-&gt;SetTexture(0, Tex_1);    device-&gt;SetRenderState( D3DRS_ALPHABLENDENABLE,TRUE);    device-&gt;SetRenderState( D3DRS_SRCBLEND,D3DBLEND_SRCALPHA);    device-&gt;SetRenderState( D3DRS_DESTBLEND,D3DBLEND_INVSRCALPHA);    device-&gt;SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX,0);    device-&gt;SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );    device-&gt;SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_SELECTARG1 );//device-&gt;SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTA_DIFFUSE );device-&gt;SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE );    device-&gt;SetTextureStageState( 0, D3DTSS_ALPHAOP,   D3DTOP_SELECTARG1 );    device-&gt;DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0,rowidth*colheight,0,(rowidth-1)*(colheight-1)*2);    device-&gt;SetTexture(0, Tex_2);    device-&gt;SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );    device-&gt;SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_SELECTARG1 );    device-&gt;DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0,rowidth*colheight,0,(rowidth-1)*(colheight-1)*2);    device-&gt;SetTexture(0, Tex_3);    device-&gt;SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );    device-&gt;SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_SELECTARG1 );    device-&gt;DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0,rowidth*colheight,0,(rowidth-1)*(colheight-1)*2);    device-&gt;SetTexture(0, Tex_4);   device-&gt;SetTextureStageState(0, D3DTSS_TEXCOORDINDEX, 0);    device-&gt;SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );   device-&gt;SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_SELECTARG1 );    device-&gt;DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0,rowidth*colheight,0,(rowidth-1)*(colheight-1)*2);    MyTr-&gt;Lock(0,0,(void **) &mymap,0);    for (int i =0;i&lt;64*64;i++){   //mymap._color=(diffusevt&lt;&lt;24);    mymap._color=0xccff0000;}    MyTr-&gt;Unlock();   device-&gt;SetTexture(0, Tex_4);    device-&gt;SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE );   device-&gt;SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1  );    device-&gt;DrawIndexedPrimitive(D3DPT_TRIANGLELIST, 0, 0,rowidth*colheight,0,(rowidth-1)*(colheight-1)*2);
  Can't tell you why it doesn't work, but I can tell you how to do it better. When you want everything to have a specific colour, use SetRenderState(D3DRS_TEXTUREFACTOR, colour) and use D3DTA_TFACTOR for ARG1. This way you don't have to lock anything, which is a costly operation.   