I was following the tutorials that comes with DirectX SDK, and i saw Tutorial6, which was about loading and showing meshes.I tried loading some .x files i made with sketchup and it worked fine. Then i decided to modify the code and allow it to load several models.
It didn't work. I believe it succesfully finds and loads the model. But it shows nothing on the screen.(Except the color i used to clear the screen) Can you look into the code and tell me what am i doing wrong?
I attached both of the original tutorial code and my modified one.
P.S sorry for my bad english meshproblem.rar7.24KB44 downloads
I do not have debugging your program, but I think you can modify the code in your function LoadModel and try agin.
if( FAILED( D3DXLoadMeshFromX( "modelname.x", D3DXMESH_SYSTEMMEM,
&pD3DXMtrlBuffer, NULL, &model.g_dwNumMaterials,
&model.g_pMesh ) ) )
MessageBox( NULL, "Could not find modelname.x", "Meshes.exe", MB_OK );