LPDirect3DDevice9
is an alias for the type IDirect3DDevice9 *
, which is a pointer to a Direct3D 9 device object. You are using D3D11, which means you have a completely incompatible device interface. Your device initialization is (probably) fine, you will just not be able to use D3DXLoadMeshFromX
because it's only supported on an older version of Direct3D.
D3DX was deprecated after D3D10. The functionality you are looking for is no longer available as part of the core SDK, you will need to find it elsewhere.
You can either write your own, for any number of file formats including .X
(.obj
is popular and Google can help you find tutorials) or utilize a 3rd party library such as Assimp.
LPDirect3DDevice9
is a typedef forIDirect3DDevice9*
. Try passing a pointer to your device. \$\endgroup\$ID3D11Device11
implementsID3D11Device9
so that should work to. Just test it. \$\endgroup\$ID3D11Device : public IUnknown
So i dont understand... I tried this:..., (LPDIRECT3DDEVICE9)m_pd3dDevice, ..
But i dont think it will work. I cant test right now.. \$\endgroup\$