Index: orxonox/branches/importer/importer/framework.cc
===================================================================
--- orxonox/branches/importer/importer/framework.cc	(revision 2780)
+++ orxonox/branches/importer/importer/framework.cc	(revision 2794)
@@ -15,5 +15,5 @@
   glLoadIdentity(); // Reset the view
   
-  glMatrixMode(GL_PROJECTION);						// Select The Projection Matrix
+  glMatrixMode(GL_PROJECTION);
   glLoadIdentity();	
   gluPerspective(45.0f,500/375,0.1f,100.0f);
@@ -21,4 +21,8 @@
   whiteLight[1] = .5+.5*sin(rotator*10);
   whiteLight[2] = .5+.5*sin(rotator*10);
+
+  GLfloat lightPosition[] = {10.0*sin(rotator*10), 10, 19.0, 0.0};
+  glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
+
   glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
   obj->draw();
@@ -46,7 +50,5 @@
   obj = new Object (argv[1]);
 
-  GLfloat lightPosition[] = {10.0, 5.0, 19.0, 0.0};
   GLfloat lmodelAmbient[] = {.1, .1, .1, 1.0};
-  glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
   glLightfv(GL_LIGHT0, GL_DIFFUSE, whiteLight);
   glLightfv(GL_LIGHT0, GL_SPECULAR, whiteLight);
Index: orxonox/branches/importer/importer/object.cc
===================================================================
--- orxonox/branches/importer/importer/object.cc	(revision 2780)
+++ orxonox/branches/importer/importer/object.cc	(revision 2794)
@@ -37,4 +37,6 @@
   glNewList (listNumber, GL_COMPILE);
   glEnableClientState (GL_VERTEX_ARRAY);
+  glEnableClientState (GL_NORMAL_ARRAY);
+  //  glEnableClientState (GL_TEXTURE_COORD_ARRAY);
 
   return true;
@@ -64,5 +66,5 @@
   char Buffer[500];
   vertices = new Array();
-  faces = new Array();
+  normals = new Array();
   while(!OBJ_FILE->eof())
     {
@@ -92,4 +94,11 @@
 	  readUseMtl (Buffer+7);
 	}
+
+      // case VertexNormal
+      else if (!strncmp(Buffer, "vn ", 2))
+      {
+	readVertexNormal(Buffer+3);
+      }
+
       // case vt
       else if (!strncmp(Buffer, "vt ", 2))
@@ -126,4 +135,6 @@
       vertices->finalizeArray();
       glVertexPointer(3, GL_FLOAT, 0, vertices->getArray());
+      normals->finalizeArray();
+      glNormalPointer(GL_FLOAT, 0, normals->getArray());
     }
 
@@ -134,5 +145,5 @@
   char subbuffer4[20] ="";
   sscanf (faceString, "%s %s %s %s", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
-  //	  vertices->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3));
+  //  printf("%s, %s, %s\n", subbuffer1,subbuffer2,subbuffer3);
   if (!strcmp(subbuffer4, ""))
     {
@@ -171,10 +182,30 @@
 bool Object::addGLElement (char* elementString)
 {
-  char* pointTo;
-  pointTo = strstr (elementString, "/");
-  pointTo[0] = '\0';
-  //  printf ("f: %s\n", elementString);
-  glArrayElement(atoi(elementString)-1);
-
+  char* vertex = elementString;
+  char* texture;
+  char* normal;
+  texture = strstr (vertex, "/");
+  texture[0] = '\0';
+  texture ++;
+  normal = strstr (texture, "/");
+  normal[0] = '\0';
+  normal ++;
+  
+  //glArrayElement(atoi(vertex)-1);
+  glNormal3fv(normals->getArray() +(atoi(normal)-1)*3);
+  glVertex3fv(vertices->getArray() +(atoi(vertex)-1)*3);
+
+}
+
+bool Object::readVertexNormal (char* normalString)
+{
+  readVertices = true;
+  char subbuffer1[20];
+  char subbuffer2[20];
+  char subbuffer3[20];
+  sscanf (normalString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3);
+  //  printf("%s, %s, %s\n", subbuffer1,subbuffer2,subbuffer3);
+  normals->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3));
+  return true;
 }
 
@@ -190,5 +221,4 @@
   char Buffer[500];
   vertices = new Array();
-  faces = new Array();
   material = new Material();
   Material* tmpMat = material;
Index: orxonox/branches/importer/importer/object.h
===================================================================
--- orxonox/branches/importer/importer/object.h	(revision 2780)
+++ orxonox/branches/importer/importer/object.h	(revision 2794)
@@ -29,5 +29,5 @@
   int verticesCount;
   Array* colors;
-  Array* faces;
+  Array* normals;
   char* objFile;
   int faceMode;
@@ -41,4 +41,5 @@
   bool readFace (char* faceString);
   bool readVT (char* vtString);
+  bool readVertexNormal (char* normalString);
   bool readMtlLib (char* matFile);
   bool readUseMtl (char* mtlString);
