Index: branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc
===================================================================
--- branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc	(revision 8551)
+++ branches/bsp_model/src/lib/graphics/importer/md3/md3_model.cc	(revision 8552)
@@ -18,6 +18,10 @@
 
 #include "md3_data.h"
+#include "md3_mesh.h"
+#include "md3_tag.h"
 
 #include "md3_animation_cfg.h"
+
+#include "material.h"
 
 namespace md3
@@ -73,17 +77,100 @@
     }
 
+    //draw all meshes of current frame of this model
+    for( int i = 0;  i < data->meshNum; i++) {
+      MD3Mesh* mesh = data->meshes[i];
 
+//       gl.glBlendFunc(mesh.GLSrcBlendFunc, mesh.GLDstBlendFunc);
+//       gl.glDepthMask(mesh.GLDepthMask);
+
+      if( mesh->header->textureNum > 0 && &mesh->material[0] != NULL)
+        mesh->material[0].select();
+
+      // get mesh frame, do interpolation if necessary
+      sVec3D* frame;
+      if( data->animationState.interpolationFraction != 0.0 &&
+          data->animationState.currentFrame != data->animationState.nextFrame) {
+        //interpolate mesh frame between the 2 current mesh frames
+        frame = this->interpolateMeshFrame(mesh, data->animationState.currentFrame, data->animationState.nextFrame,
+                                           data->animationState.interpolationFraction);
+      }
+      else {
+        //no interpolation needed, just draw current frame
+        frame = &mesh->meshFrames[data->animationState.currentFrame];
+      }
+
+      this->drawMesh(mesh, frame);
+
+      //draw vertex normals
+      if( this->bDrawNormals) {
+        // get vertex normals, interpolate if necessary
+        if( data->animationState.interpolationFraction != 0.0 &&
+            data->animationState.currentFrame != data->animationState.nextFrame) {
+          //interpolate vertex normals
+          this->drawVertexNormals(frame, this->interpolateVertexNormals(&mesh->normals[data->animationState.currentFrame],
+                                  &mesh->normals[data->animationState.nextFrame], data->animationState.interpolationFraction));
+        }
+        else {
+          //stick with current vertex normals
+          this->drawVertexNormals(frame, &mesh->normals[data->animationState.currentFrame]);
+        }
+      }
+    }
+
+    //draw all models linked to this model
+
+    std::map<int, MD3Data*>::iterator it = data->sortedMap.begin();
+    while( it != data->sortedMap.end()) {
+      MD3Data* child = it->second;
+
+      //build transformation array m from matrix, interpolate if necessary
+      float* m = new float[16];
+
+    }
 
   }
 
 
+  /**
+   * draws the mesh
+   */
+  void MD3Model::drawMesh(MD3Mesh* mesh, sVec3D* frame)
+  {}
+
+
+  /**
+   *  drawo vertex normals
+   */
+  void MD3Model::drawVertexNormals(sVec3D* frame, MD3Normal* normals)
+  {}
+
+
+  /**
+   *  interpolate bone frame
+   */
   MD3BoneFrame MD3Model::interpolateBoneFrame(MD3BoneFrame* currBoneFrame, MD3BoneFrame* nextBoneFrame, float frac)
   {}
 
 
+  /**
+   * draw bone frame
+   */
   void MD3Model::drawBoneFrame(MD3BoneFrame* frame)
   {}
 
 
+  /**
+   * interpolate mesh frame
+   */
+  sVec3D* MD3Model::interpolateMeshFrame(MD3Mesh* mesh, int startFrame, int nextMeshFrame, float frac)
+  {}
+
+
+  /**
+   * interpolate vertex normal
+   */
+  MD3Normal* MD3Model::interpolateVertexNormals(MD3Normal* curNormals, MD3Normal* nextNormals, float frac)
+  {}
+
 
 }
Index: branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h
===================================================================
--- branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h	(revision 8551)
+++ branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h	(revision 8552)
@@ -19,4 +19,7 @@
 class MD3Data;
 class MD3BoneFrame;
+class MD3Mesh;
+struct MD3Normal;
+
 
 class MD3Model : public InteractiveModel
@@ -37,6 +40,14 @@
     void draw(MD3Data* data);
 
+    void drawMesh(MD3Mesh* mesh, sVec3D* frame);
+    void drawVertexNormals(sVec3D* frame, MD3Normal* normals);
+
+
     MD3BoneFrame* interpolateBoneFrame(MD3BoneFrame* currBoneFrame, MD3BoneFrame* nextBoneFrame, float frac);
     void drawBoneFrame(MD3BoneFrame* frame);
+
+    sVec3D* interpolateMeshFrame(MD3Mesh* mesh, int startFrame, int nextMeshFrame, float frac);
+
+    MD3Normal* interpolateVertexNormals(MD3Normal* curNormals, MD3Normal* nextNormals, float frac);
 
 
@@ -45,4 +56,5 @@
 
     bool                bDrawBones;        //!< draws the bone frames too
+    bool                bDrawNormals;      //!< draw the normals
 };
 
