[Tut] Some Functions for D3D
Here are some functions you can add in your D3D.
How to do
WireFrame:
- used Strides from Combat Arms
- place this in
SetRenderState
Code:
if (m_Stride == 32)
m_pD3Ddev->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
}
How to do
NoFog:
- place this in
SetRenderState
Code:
if (nofog)
{
m_pD3Ddev->SetRenderState(D3DRS_FOGENABLE, false);
}
How to do a
WallHack:
- used Strides from Combat Arms
- place this in
DrawIndexedPrimitive
Code:
if(m_Stride == 32)
{
m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
How to do
FullBright:
- place this in
SetRenderState
Code:
if (fullbright)
{
m_pD3Ddev->SetRenderState(D3DRS_LIGHTING, false);
m_pD3Ddev->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255, 255,255,255));
}
else
{
m_pD3Ddev->SetRenderState(D3DRS_AMBIENT, false);
}
what are the 36 and 44 strides for?
Reopened and moved to correct section.
If you compile it does it work?
Ok. i need quick help. Please and Thank you. I will rep.
Ok. so I tried to use this code with the CaBase i downloaded, but I just can't seem to find were i can use this. Seems that CaBase uses completly diffrent way of writing it.
Also after editing CaBase i tried to compile it and it failed.
Seems that i need "d3dx9.h" where can i get that?
Thank you.