Requesting help with a simple model viewer

Started by
2 comments, last by OandO 13 years, 6 months ago
This is my first proper attempt at graphics programming, so bear with me here. I'm constructing a basic model viewer in C for my first practical OpenGL based application, just to get familiar with it, and work out a proper pipeline etc. I've found what appears to be a fairly popular library for parsing Doom 3's MD5 model format ( http://savannah.nongnu.org/projects/libmd5model/ ) which I plan on using for the time being, but there's an ominous lack of documentation meaning that I'm not really sure how I'm supposed to use it. Since I've never used OpenGL to render a full mesh before, I need a little help. Am I supposed to retrieve the vertex data and use a loop to draw individual polygons, or what?

Thanks in advance.
Advertisement
Quote:Am I supposed to retrieve the vertex data and use a loop to draw individual polygons


Yes. Since it is your first attempt, have you already tried rendering a cube with hard coded vertices before?

After that, I suggest you try collada instead because the files are in ASCII, XML and is readable, so you know what you are doing and can go back and read if your program crashes or have unexpected results.

You can also make your own models using blender and export in Collada just to see what combination of data can be included in typical models.
==============================================Rage - Really Amateurish Graphics EngineCollada Parser / Serializer
Quote:Original post by jakesee
Quote:Am I supposed to retrieve the vertex data and use a loop to draw individual polygons


Yes. Since it is your first attempt, have you already tried rendering a cube with hard coded vertices before?

After that, I suggest you try collada instead because the files are in ASCII, XML and is readable, so you know what you are doing and can go back and read if your program crashes or have unexpected results.

You can also make your own models using blender and export in Collada just to see what combination of data can be included in typical models.


Agreed. Even if I had done plenty of openGL stuff before, I always start with a hard coded cube.
Yes I ran through some basic hardcoded shapes to begin with, I was just wondering if that was the "proper" way of handling complex meshes.

Thanks for the help, I'll let you know what I get on.

This topic is closed to new replies.

Advertisement