Archived

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

Mesh not visible?

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

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