Jump to content
  • Advertisement

Archived

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

BlueChip

Sorry.. another question about files .X [novice]

This topic is 5769 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

Hi... I''ve read many tutorials, papers and SDK documentation, ( and other topics in this forum of course) but I can''t load a mesh from a file .x This is my code: LPCTSTR m_pFilename; LPD3DXBUFFER * m_pbufAdjacency; LPD3DXBUFFER * m_pbufMaterials; LPD3DXBUFFER* m_ppEffectInstances; DWORD* m_dwNumMaterials; ID3DXMesh* m_pMesh; Under myclass costructor: m_pFilename=_T("tiger.x"); //tiger.x is a X file in SDK Under InitDeviceObjects() hr = D3DXLoadMeshFromX( m_pFilename, D3DXMESH_MANAGED, m_pd3dDevice, NULL, NULL,NULL, m_dwNumMaterials, &m_pMesh ); That give me a run time error... why? Do you see an error? thanks ;-)

Share this post


Link to post
Share on other sites
Advertisement
i guess it''s with the materials? you didn''t allocate a memory.., don''t use pointer to a DWORD, instead just declare the DWORD material and pass it in as an address, ie, &m_dwNumMaterials

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
here is a working mesh class

http://www.gamedev.net/community/forums/topic.asp?topic_id=137073

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
hey does anyone know if it is possible to have multiple sets of texture coordinates in a .x file ?

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!