Archived

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

HDATA

CD3DMesh and Normals !!!!

Recommended Posts

HDATA    122
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
AlexanderCZ    122

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