Help me with 3ds file format,

Started by
3 comments, last by Vulc777 21 years, 2 months ago
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();
Advertisement
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
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
Thanks,
Thanks, i was wrong.

This topic is closed to new replies.

Advertisement