Credits: Tate
Original Thread
Some of you may have tried to make wireframe for Op7, with no avail. Here's how you SHOULD be doing it, if your wireframe is being whack. (Assuming m_pD3Ddev is your device. It couldnt anything, such as pdevice) /*Under your includes*/
PHP Code:
LPDIRECT3DTEXTURE9 texCyan;
/*In CD3DManager::Initialize()*/
PHP Code:
GenerateTexture(m_pD3Ddev, &texCyan, D3DCOLOR_ARGB(255,0,255,255));
/*In DrawIndexedPrimitive*/
PHP Code:
if(m_Stride == 20 && NumVertices == 1766) { m_pD3Ddev->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_ONE ); m_pD3Ddev->SetTexture(0, texCyan); m_pD3Ddev->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_ONE ); m_pD3Ddev->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); m_pD3Ddev->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_ONE ); } else { m_pD3Ddev->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID); }
Your wireframe should now look like this:
You can change the color of your wireframe by modifying the ARGB value, here:
PHP Code:
GenerateTexture(m_pD3Ddev, &texCyan, D3DCOLOR_ARGB(255,0,255,255))