Archived

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

CD3DMesh and Normals !!!!

This topic is 5536 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 there, I loaded a mesh by CD3DMesh, I have problem on it, not in loading that ... I think the picture can say it better: http://www.geocities.com/hadi_rezaie/problems.html I used this code for loading that: mesh_Building.Create(obj_D3D.GetD3DDevice(), "3dhome_2.x"); mesh_Building.SetFVF(obj_D3D.GetD3DDevice(), mesh_Building.GetSysMemMesh()->GetFVF() | D3DFVF_NORMAL); mesh_Building.RestoreDeviceObjects(obj_D3D.GetD3DDevice()); What''s wrong ??? Regards,

Share this post


Link to post
Share on other sites

i do not use CD3DMesh,but while i was looking to the implementation of Create() method i didn''t see initialization of m_pLocalMesh.Simply try this,but i''am not sure:

  
mesh_Building.Create(obj_D3D.GetD3DDevice(), "3dhome_2.x");
mesh_Building.RestoreDeviceObjects(obj_D3D.GetD3DDevice());
mesh_Building.SetFVF(obj_D3D.GetD3DDevice(), mesh_Building.GetSysMemMesh()->GetFVF() | D3DFVF_NORMAL);
mesh_Building.RestoreDeviceObjects(obj_D3D.GetD3DDevice());

Share this post


Link to post
Share on other sites