Funcionts in DrawIndexedPrimitive: 1.Wall # + Chams 2.No Fog 3.No Flash 4.No Smoke 5.Asus 6.Full Bright 7.Wire Frame Code: LPDIRECT3DVERTEXBUFFER9 Stream_Data; LPDIRECT3DTEXTURE9 BTEX = NULL; D3DSURFACE_DESC pDesc; D3DVIEWPORT9 Vwp; UINT Offset = 0; UINT Stride = 0; if(pDevice->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK) Stream_Data->Release(); pDevice->GetViewport( &Vwp ); if (Fucntions_Table1[0] && (Stride == 40 || Stride == 44)) { pDevice->SetRenderState(D3DRS_ZENABLE, FALSE); if (Fucntions_Table1[1] == 1) pDevice->SetTexture(0, C_Green); if (Fucntions_Table1[1] == 2) pDevice->SetTexture(0, C_Red); if (Fucntions_Table1[1] == 3) pDevice->SetTexture(0, C_Blue); if (Fucntions_Table1[1] == 4) pDevice->SetTexture(0, C_Orange); if (Fucntions_Table1[1] == 5) pDevice->SetTexture(0, C_Yellow); if (Fucntions_Table1[1] == 6) pDevice->SetTexture(0, C_Pink); if (Fucntions_Table1[1] == 7) pDevice->SetTexture(0, C_Cyan); if (Fucntions_Table1[1] == 8) pDevice->SetTexture(0, C_Purple); if (Fucntions_Table1[1] == 9) pDevice->SetTexture(0, C_Black); if (Fucntions_Table1[1] == 10) pDevice->SetTexture(0, C_White); if (Fucntions_Table1[1] == 11) pDevice->SetTexture(0, C_Grey); if (Fucntions_Table1[1] == 12) pDevice->SetTexture(0, C_SteelBlue); if (Fucntions_Table1[1] == 13) pDevice->SetTexture(0, C_LightSteelBlue); if (Fucntions_Table1[1] == 14) pDevice->SetTexture(0, C_LightBlue); if (Fucntions_Table1[1] == 15) pDevice->SetTexture(0, C_Salmon); if (Fucntions_Table1[1] == 16) pDevice->SetTexture(0, C_Brown); if (Fucntions_Table1[1] == 17) pDevice->SetTexture(0, C_Teal); if (Fucntions_Table1[1] == 18) pDevice->SetTexture(0, C_Lime); if (Fucntions_Table1[1] == 19) pDevice->SetTexture(0, C_ElectricLime); if (Fucntions_Table1[1] == 20) pDevice->SetTexture(0, C_Gold); if (Fucntions_Table1[1] == 21) pDevice->SetTexture(0, C_OrangeRed); if (Fucntions_Table1[1] == 22) pDevice->SetTexture(0, C_GreenYellow); if (Fucntions_Table1[1] == 23) pDevice->SetTexture(0, C_AquaMarine); if (Fucntions_Table1[1] == 24) pDevice->SetTexture(0, C_SkyBlue); if (Fucntions_Table1[1] == 25) pDevice->SetTexture(0, C_SlateBlue); if (Fucntions_Table1[1] == 26) pDevice->SetTexture(0, C_Crimson); if (Fucntions_Table1[1] == 27) pDevice->SetTexture(0, C_DarkOliveGreen); if (Fucntions_Table1[1] == 28) pDevice->SetTexture(0, C_PaleGreen); if (Fucntions_Table1[1] == 29) pDevice->SetTexture(0, C_DarkGoldenRod); if (Fucntions_Table1[1] == 30) pDevice->SetTexture(0, C_FireBrick); if (Fucntions_Table1[1] == 31) pDevice->SetTexture(0, C_DarkBlue); if (Fucntions_Table1[1] == 32) pDevice->SetTexture(0, C_DarkerBlue); if (Fucntions_Table1[1] == 33) pDevice->SetTexture(0, C_DarkYellow); if (Fucntions_Table1[1] == 34) pDevice->SetTexture(0, C_LightYellow); if (Fucntions_Table1[1] == 35) pDevice->SetTexture(0, C_DarkOutline); pDrawIndexedPrimitive2(pDevice, PrimType, BaseVertexIndex, MinVertexIndex, NumVertices, StartIndex, PrimitiveCount); pDevice->SetRenderState(D3DRS_ZENABLE, TRUE); if (Fucntions_Table1[2] == 1) pDevice->SetTexture(0, C_Green); if (Fucntions_Table1[2] == 2) pDevice->SetTexture(0, C_Red); if (Fucntions_Table1[2] == 3) pDevice->SetTexture(0, C_Blue); if (Fucntions_Table1[2] == 4) pDevice->SetTexture(0, C_Orange); if (Fucntions_Table1[2] == 5) pDevice->SetTexture(0, C_Yellow); if (Fucntions_Table1[2] == 6) pDevice->SetTexture(0, C_Pink); if (Fucntions_Table1[2] == 7) pDevice->SetTexture(0, C_Cyan); if (Fucntions_Table1[2] == 8) pDevice->SetTexture(0, C_Purple); if (Fucntions_Table1[2] == 9) pDevice->SetTexture(0, C_Black); if (Fucntions_Table1[2] == 10) pDevice->SetTexture(0, C_White); if (Fucntions_Table1[2] == 11) pDevice->SetTexture(0, C_Grey); if (Fucntions_Table1[2] == 12) pDevice->SetTexture(0, C_SteelBlue); if (Fucntions_Table1[2] == 13) pDevice->SetTexture(0, C_LightSteelBlue); if (Fucntions_Table1[2] == 14) pDevice->SetTexture(0, C_LightBlue); if (Fucntions_Table1[2] == 15) pDevice->SetTexture(0, C_Salmon); if (Fucntions_Table1[2] == 16) pDevice->SetTexture(0, C_Brown); if (Fucntions_Table1[2] == 17) pDevice->SetTexture(0, C_Teal); if (Fucntions_Table1[2] == 18) pDevice->SetTexture(0, C_Lime); if (Fucntions_Table1[2] == 19) pDevice->SetTexture(0, C_ElectricLime); if (Fucntions_Table1[2] == 20) pDevice->SetTexture(0, C_Gold); if (Fucntions_Table1[2] == 21) pDevice->SetTexture(0, C_OrangeRed); if (Fucntions_Table1[2] == 22) pDevice->SetTexture(0, C_GreenYellow); if (Fucntions_Table1[2] == 23) pDevice->SetTexture(0, C_AquaMarine); if (Fucntions_Table1[2] == 24) pDevice->SetTexture(0, C_SkyBlue); if (Fucntions_Table1[2] == 25) pDevice->SetTexture(0, C_SlateBlue); if (Fucntions_Table1[2] == 26) pDevice->SetTexture(0, C_Crimson); if (Fucntions_Table1[2] == 27) pDevice->SetTexture(0, C_DarkOliveGreen); if (Fucntions_Table1[2] == 28) pDevice->SetTexture(0, C_PaleGreen); if (Fucntions_Table1[2] == 29) pDevice->SetTexture(0, C_DarkGoldenRod); if (Fucntions_Table1[2] == 30) pDevice->SetTexture(0, C_FireBrick); if (Fucntions_Table1[2] == 31) pDevice->SetTexture(0, C_DarkBlue); if (Fucntions_Table1[2] == 32) pDevice->SetTexture(0, C_DarkerBlue); if (Fucntions_Table1[2] == 33) pDevice->SetTexture(0, C_DarkYellow); if (Fucntions_Table1[2] == 34) pDevice->SetTexture(0, C_LightYellow); if (Fucntions_Table1[2] == 35) pDevice->SetTexture(0, C_DarkOutline); } if (Fucntions_Table1[3]) pDevice->SetRenderState(D3DRS_FOGENABLE, FALSE); if (Fucntions_Table1[4]) { pDevice->GetTexture( 0, (LPDIRECT3DBASETEXTURE9*)&BTEX ); if( BTEX ) { BTEX->GetLevelDesc( 0, &pDesc ); BTEX->Release(); } if( pDesc.Height == Vwp.Height && pDesc.Width == Vwp.Width ) return D3D_OK; } if (Fucntions_Table1[5]) { return D3D_OK; } if (Fucntions_Table1[6] && (Stride == 40 || Stride == 44)) { pDevice->SetRenderState( D3DRS_SRCBLEND, 2 ); pDevice->SetRenderState( D3DRS_DESTBLEND, 3 ); pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, true ); } if (Fucntions_Table1[7] && (Stride == 40 || Stride == 44)) { pDevice->SetRenderState(D3DRS_LIGHTING, false); pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255,255,255,255)); // use all colors to glow up the lighting ingame } if (Fucntions_Table1[8] && (Stride == 40 || Stride == 44)) pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); //Draw all models with stride 40 in wireframe fill.