Mr. Hasselhoff
07-30-2006, 09:01 PM
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,MinVerte xIndex,NumVertices,startIndex,primCount);
device->SetRenderState(D3DRS_ZENABLE,dwOldZEnable);
device->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
device->SetTexture(0,tex2);
}
cause some things were undeclared and i dont know how to do it any better you use it like this:
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: http://img129.imageshack.us/img129/8...ice00001ix.jpg (http://img129.imageshack.us/img129/8610/csoffice00001ix.jpg)
(the missing hand models are not because of this function)
Credit to myg0t- sobeit.
{
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,MinVerte xIndex,NumVertices,startIndex,primCount);
device->SetRenderState(D3DRS_ZENABLE,dwOldZEnable);
device->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
device->SetTexture(0,tex2);
}
cause some things were undeclared and i dont know how to do it any better you use it like this:
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: http://img129.imageshack.us/img129/8...ice00001ix.jpg (http://img129.imageshack.us/img129/8610/csoffice00001ix.jpg)
(the missing hand models are not because of this function)
Credit to myg0t- sobeit.