Note: I say surfaces but I think most other people call them meshes
I'm trying to write a md3 model loader in c++ for a project. I've run into a problem and cannot work out what is wrong. I'm working through it step by step so have not yet implemented animation or textures. I can load in a single md3 model but only if it has a single surface. If it has multiple surfaces it does not display it correctly, I can see the rough shape there though. Oddly I can load in one model that has 5 surface the only difference I can see is that it is just one frame.
If I add all the triangles from all the surfaces to an array and all the vertices to an array and try and draw them in one go I get the working model and odd looking other ones.
I tried drawing the vertices to the screen after each surface object but this didn't work at all.
Not sure where to go from here
Any help will be greatly appreciated
Help with a quake 3 md3 model loader?
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
Re: Help with a quake 3 md3 model loader?
Is your code available somewhere, on GitHub or the like?
Re: Help with a quake 3 md3 model loader?
I've got a zip of the files on my server. I'll pm you the download link if you don't mind. I don't like putting messy unfinished code up for everyone to see
Re: Help with a quake 3 md3 model loader?
Triple check that you are parsing and sending flawless vertex and index buffers to the API.