//---------------------------------------------------------------------------- void PdrVertexFormat::Disable (Renderer* renderer) { IDirect3DDevice9* device = renderer->mData->mDevice; PX2_UNUSED(device); HRESULT hr; PX2_UNUSED(hr); #ifdef PX2_PDR_DEBUG IDirect3DVertexDeclaration9* activeDeclaration = 0; hr = device->GetVertexDeclaration(&activeDeclaration); assertion(hr == D3D_OK, "Failed to get vertex declaration: %s\n", DXGetErrorString(hr)); assertion(activeDeclaration == mDeclaration, "Mismatched vertex declarations\n"); activeDeclaration->Release(); #endif hr = device->SetVertexDeclaration(0); assertion(hr == D3D_OK, "Failed to set vertex declaration: %s\n", DXGetErrorString(hr)); }