(XDK D3D) Refactor LPDIRECT3D member to g_pD3D