By
gC-Admin
i was bored and made this
PHP Code:
void XQZwh(IDirect3DDevice9* device, LPDIRECT3DTEXTURE9 tex1, LPDIRECT3DTEXTURE9 tex2, D3DPRIMITIVETYPE Type,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
DWORD dwOldZEnable;
device->SetTexture(0,NULL);
device->SetTexture(0,tex1);
device->GetRenderState(D3DRS_ZENABLE,&dwOldZEnable);
device->SetRenderState(D3DRS_ZENABLE,D3DZB_FALSE);
device->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
device->DrawIndexedPrimitive(Type,BaseVertexIndex,MinVertexIndex,NumVertices,startIndex,primCount);
device->SetRenderState(D3DRS_ZENABLE,dwOldZEnable);
device->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
device->SetTexture(0,tex2);
}
because some things were undeclared and i dont know how to do it any better you use it like this:
PHP Code:
if (NumVertices == number){
XQZwh(m_pD3Ddev, texOrange, texTur, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
return m_pD3Ddev->DrawIndexedPrimitive(Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}
in DrawIndexedPrimitive
example: (the missing hand models are not because of this function)