g_pMeshMaterials = new D3DMATERIAL8[g_dwNumMaterials] ;
g_pMeshTextures = new LPDIRECT3DTEXTURE8[g_dwNumMaterials] ;
trying to load a mesh
I''m trying to load an x-file and I''m using the sdk docs
but now I''m stuck at this point :
how are g_pMeshMaterials & g_pMeshTextures declared, because I get these errors :
error C2065: ''g_pMeshMaterials'' : undeclared identifier
error C2440: ''='' : cannot convert from ''struct _D3DMATERIAL8 *'' to ''int''
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
error C2065: ''g_pMeshTextures'' : undeclared identifier
error C2440: ''='' : cannot convert from ''struct IDirect3DTexture8 ** '' to ''int''
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
thanx for any advice/help in advance
Well since I had the time I just put up a lil' mesh wrapper that I made and use at:
http://www.moviecodec.com/cpp/
It's very simple so go and see if it helps you (notice it uses AnsiString which is a class included with Borland C++ Builder, however it should be no big problem to change it to use another string class/c string).
(BTW: BCB kicks MS VC++'s butt any day.. why? It's not MS that's reason enough..)
[edited by - beowulf on September 9, 2002 12:21:03 PM]
http://www.moviecodec.com/cpp/
It's very simple so go and see if it helps you (notice it uses AnsiString which is a class included with Borland C++ Builder, however it should be no big problem to change it to use another string class/c string).
(BTW: BCB kicks MS VC++'s butt any day.. why? It's not MS that's reason enough..)
[edited by - beowulf on September 9, 2002 12:21:03 PM]
They are probably declared like this:
It looks like you are working through Tutorial 6 - Meshes from the DirectX 8 SDK. I found that tutorial helpful.
[edited by - ShawnO on September 9, 2002 1:20:15 PM]
D3DMATERIAL8* g_pMeshMaterials = NULL;LPDIRECT3DTEXTURE8* g_pMeshTextures = NULL;
It looks like you are working through Tutorial 6 - Meshes from the DirectX 8 SDK. I found that tutorial helpful.
[edited by - ShawnO on September 9, 2002 1:20:15 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement