Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Da cobra

trying to load a mesh

This topic is 5886 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m trying to load an x-file and I''m using the sdk docs but now I''m stuck at this point :
  
g_pMeshMaterials = new D3DMATERIAL8[g_dwNumMaterials] ;
g_pMeshTextures  = new LPDIRECT3DTEXTURE8[g_dwNumMaterials] ;
  
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

Share this post


Link to post
Share on other sites
Advertisement
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]

Share this post


Link to post
Share on other sites
They are probably declared like this:

    
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!