Chams help :/
Hi guys,
I'm trying to make some chams for the game but it's sorta not working atm :/ hopefully you guys can help.
What this code does:
1. It renders players a skyblue color (I've found some NumVerts)
2. It only renders them blue when they are in view, and not when the view is obstructed.
3. It also renders the entire player blue when you can only see a few pixels of them and not their entire body, useful, but not really.
I've already tried SetLightChams and that just crashes the game.
Any help guys?
I'm trying to make some chams for the game but it's sorta not working atm :/ hopefully you guys can help.
What this code does:
1. It renders players a skyblue color (I've found some NumVerts)
2. It only renders them blue when they are in view, and not when the view is obstructed.
3. It also renders the entire player blue when you can only see a few pixels of them and not their entire body, useful, but not really.
I've already tried SetLightChams and that just crashes the game.
Code:
fChamsz = fChams = D3DCOLOR_ARGB(140, 0, 255, 0);
bChamsz = bChams = D3DCOLOR_ARGB(140, 255, 0, 0);
if(m_Stride == 32)
{
DWORD dwReEnableZB = D3DZB_TRUE;
pDevice->SetTexture(0,chams_bcolor);
pDevice->GetRenderState(D3DRS_ZENABLE, &dwReEnableZB);
pDevice->SetRenderState(D3DRS_ZENABLE, false);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_NEVER);
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
pDevice->SetRenderState(D3DRS_ZENABLE, true);
pDevice->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
pDevice->SetTexture(0,chams_fcolor);
}
