资 源 简 介
HRESULT WINAPI MyDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount){IDirect3DVertexBuffer9* pStreamData = NULL;UINT iOffsetInBytes, iStride;pDevice->GetStreamSource(0, &pStreamData, &iOffsetInBytes, &iStride);if (GetAsyncKeyState(VK_PAUSE) & 1){if (Wall){Wall = FALSE;Beep(2000, 200);}else{Wall = TRUE;Beep(3000, 200);}}if ((iStride == 40 || iStride == 44 || iStride == 48) && Wall){pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);}return OrigDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);}