First of all, I have to say that this one is such a brilliant tutorial at all!
I''ve ever seen a lot source code about MD2 loading before, however, I always got confused with them.
This tutorial and code is really the clearest and nicest I ever read.
Big thanks for Trent Polack''s hard works!

Hey, any further plan moving on MD3 loading tutorial?

However, I still got several questions in my mind so that I cannot totally understand it:
Q1. Why no any vertex normals are specified using glNormal3f() while loading MD2 models?
The tutorial says MD2 uses lookup table to index the normals, but I can find no predefined
tables about it. Is it kept by Quake2''s main program?
If I''d like to use the MD2 loading code in my program, how can I get the proper vertex normals
to make lighting interaction right?
Q2. In the MD2::Render(), while we''d fill the vertList[] with vertices data, about the following two lines:
vertList[index].z= -((currentFrame->vertices[vertIndex].vertex[1]*currentFrame->scale[1])+currentFrame->translate[1]);
vertList[index].y= ( (currentFrame->vertices[vertIndex].vertex[2]*currentFrame->scale[2])+currentFrame->translate[2]);
Why the vertList[index].z is using vertex[1] and vertList[index].y is using vertex[2]?
Q3. While rendering with triangle fans, why shall we use v1.SendToOGL() instead of glVertex3fv(v1.vertex) to specify vertex?
I could not figure out what the SendToOGL() means and works.
Q4. In the MD2_FRAME_TYP{} structure, we never used name[16] for the frame''s name in MD2 usage, why keeping this variable?
Q5. How can we determine the predefined MD2 state frame number constants?
For example, how can we determine that 40 frames is required from IDLE1_START to IDLE1_END, and
only 6 frames is required from RUN_START to RUN_END, etc....?