Archived

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

mishikel

Mesh not visible?

Recommended Posts

Is there a reason why the following basic code to load and render a mesh wouldn''t show up properly on the screen? [initialization] D3DMesh *m_pObject = new D3DMesh(); m_pObject->Create(m_pD3DDevice, "mesh.x"); [each frame] m_pD3DDevice->BeginScene(); m_pObject->Render(m_pD3DDevice); m_pD3DDevice->EndScene(); m_pD3DDevice->Present(NULL, NULL, NULL, NULL); The code is reused from another program I was working on that used the D3D framework (deriving a class from CD3DApplication, etc...), where it worked fine. So I created another program and initialized D3D without using CD3DApplication. Drawing a triangle using DrawPrimitive works fine, but when I try to render the mesh, I see nothing. The mesh is centered on the origin and the camera is set up correctly. Is there anything else that needs to be done? The only thing I could think of is that I left out some D3D setup code?

Share this post


Link to post
Share on other sites
hello,

ehm, i think you still have to set up the projections matrix, the view matrix and a world matrix so you mesh would show up

Share this post


Link to post
Share on other sites