This program loads, renders, and animates an MD5 model (version 10). If you are not familiar with the MD5 format, it is the 3D model format used by the Doom 3 engine. I wrote this loader after I had difficulty finding a loader for MD5 version 10 (a search yielded a loader for version 6). The models that were distributed with Doom 3 upon its commercial release were version 10.
MD5 is an ASCII format. Thus, I had to write a parser for it. Rather than use a parser generator such as yacc, I opted to write a top-down parser so the loader would not depend on any external libraries or applications. I also did not add texturing to this demo for the sake of simplicity.
The MD5 model packaged with the demo was taken with permission from the Shamblers Castle mod for Doom 3. Thanks to the Shamblers Castle team for the model.
Downloads
The MD5 Loader Demo requires the glut library to compile. I have posted two versions of the source code. The first is for GNU Make and the GNU C++ compiler (g++), and the second is a Visual Studio .NET 2003 project.
MD5 Loader Demo (cross-platform source code)
MD5 Loader Demo (Visual Studio .NET 2003 project)