Archived

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

Help me with 3ds file format,

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

I am currently writing a 3ds model loader. Everything read, materials,vertices,faces, e.t.c. I render models with D3DPT_POINTLIST, but when i am trying to render with D3DPT_TRIANGLESTRIP there is bad model, i try to use index buffer with indicies from face list, but when i try to render my model my computer crash, can you help me? My code is: Device->SetVertexShader(D3DFVF_VERTEX); Device->BeginScene(); Device->SetStreamSource(0,VertexBuffer,sizeof(D3DVERTEX)); Device->SetIndices(IndexBuffer,0); Device->DrawIndexedPrimitiveD3DPT_TRIANGLESTRIP,0,Vertices,0,Vertices/3); Device->DrawIndexedPrimitiveD3DPT_TRIANGLESTRIP,0,Vertices,0,Vertices/3) RenderDevice->EndScene();

Share this post


Link to post
Share on other sites
I think this depends on the contents of your index and vertex buffers. What is each count? Also did you stripify the content of your 3ds model before rendering? If not, then you should use TRIANGLELIST instead of TRIANGLESTRIP. However, it looks ok so far...

- Mete

Share this post


Link to post
Share on other sites
no baby
it is a mistake using strips
use triangle list instead.
it is the way 3ds writes its data.
( but make sure u pass correct indexes)
regards

Share this post


Link to post
Share on other sites