Index: orxonox/branches/importer/importer/array.cc
===================================================================
--- orxonox/branches/importer/importer/array.cc	(revision 2795)
+++ orxonox/branches/importer/importer/array.cc	(revision 2804)
@@ -12,4 +12,6 @@
 void Array::createArray (unsigned int newArraySize)
 {
+  if (verbose >= 2)
+    printf ("crating new Array of size %i\n", newArraySize);
   array = new GLfloat [newArraySize];
   entryCount = -1; //0 means one entry
@@ -20,4 +22,6 @@
 void Array::resizeArray (unsigned int newSize)
 {
+  if (verbose >= 2)
+    printf ("Resizing Array to size %i\n", newSize);  
   GLfloat* newArray = new GLfloat [newSize];
   
@@ -34,4 +38,6 @@
 void Array::finalizeArray (void)
 {
+  if (verbose >= 3)
+    printf ("Finalizing array.\n");  
   resizeArray (entryCount+1);
   return;
@@ -41,4 +47,6 @@
 void Array::addEntry (GLfloat entry)
 {
+  if (verbose >= 3)
+    printf ("adding new Entry to Array: %f\n", entry);
   entryCount++;
 
Index: orxonox/branches/importer/importer/array.h
===================================================================
--- orxonox/branches/importer/importer/array.h	(revision 2795)
+++ orxonox/branches/importer/importer/array.h	(revision 2804)
@@ -1,4 +1,6 @@
 #ifndef _ARRAY_H
 #define _ARRAY_H
+
+extern int verbose;
 
 #include <GL/gl.h>
Index: orxonox/branches/importer/importer/framework.cc
===================================================================
--- orxonox/branches/importer/importer/framework.cc	(revision 2795)
+++ orxonox/branches/importer/importer/framework.cc	(revision 2804)
@@ -2,5 +2,5 @@
 #include "object.h"
 
-
+int verbose = 2;
 WindowHandler wHandler;  // Create an instance of the whandler basecode class
 Object* obj;
Index: orxonox/branches/importer/importer/material.cc
===================================================================
--- orxonox/branches/importer/importer/material.cc	(revision 2795)
+++ orxonox/branches/importer/importer/material.cc	(revision 2804)
@@ -17,4 +17,6 @@
 Material* Material::addMaterial(char* mtlName)
 {
+  if (verbose >=2)
+    printf ("adding Material %s\n", mtlName);
   Material* newMat = new Material(mtlName);
   Material* tmpMat = this;
@@ -30,4 +32,6 @@
 void Material::init(void)
 {
+  if (verbose >= 3)
+    printf ("initializing new Material\n");
   nextMat = NULL;
 
@@ -42,4 +46,6 @@
 void Material::setName (char* mtlName)
 {
+  if (verbose >= 3)
+    printf("setting Material Name to %s", mtlName);
   strcpy(name, mtlName);
   //  printf ("adding new Material: %s, %p\n", this->getName(), this);
@@ -54,4 +60,6 @@
 void Material::setIllum (int illum)
 {
+  if (verbose >= 3)
+    printf("setting illumModel of Material %s to %i", name, illum);
   illumModel = illum;
   //  printf ("setting illumModel to: %i\n", illumModel);
@@ -64,4 +72,6 @@
 void Material::setDiffuse (float r, float g, float b)
 {
+  if (verbose >= 3)
+    printf ("setting Diffuse Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
   diffuse[0] = r;
   diffuse[1] = g;
@@ -69,5 +79,4 @@
   diffuse[3] = 1.0;
 
-  //  printf ("setting Diffuse Color to r=%f g=%f b=%f\n", r, g, b);
 }
 void Material::setDiffuse (char* rgb)
@@ -80,9 +89,10 @@
 void Material::setAmbient (float r, float g, float b)
 {
+  if (verbose >=3)
+    printf ("setting Ambient Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
   ambient[0] = r;
   ambient[1] = g;
   ambient[2] = b;
   ambient[3] = 1.0;
-  //  printf ("setting Ambient Color to r=%f g=%f b=%f\n", r, g, b);
 }
 void Material::setAmbient (char* rgb)
@@ -95,10 +105,11 @@
 void Material::setSpecular (float r, float g, float b)
 {
+  if (verbose >= 3)
+    printf ("setting Specular Color of Material %s to r=%f g=%f b=%f\n", name, r, g, b);
   specular[0] = r;
   specular[1] = g;
   specular[2] = b;
   specular[3] = 1.0;
-  //printf ("setting Specular Color to r=%f g=%f b=%f\n", r, g, b);
-}
+ }
 void Material::setSpecular (char* rgb)
 {
@@ -111,4 +122,6 @@
 void Material::setTransparency (float trans)
 {
+  if (verbose >= 3)
+    printf ("setting Transparency of Material %s to %f\n", name, trans);
   transparency = trans;
 }
@@ -123,9 +136,17 @@
 Material* Material::search (char* mtlName)
 {
+  if (verbose >=3)
+    printf ("Searching for material %s", mtlName);
   Material* searcher = this;
   while (searcher != NULL)
     {
+      if (verbose >= 3)
+	printf (".");
       if (!strcmp (searcher->getName(), mtlName))
-	return searcher;
+	{
+	  if (verbose >= 3)
+	    printf ("found.\n");
+	  return searcher;
+	}
       searcher = searcher->nextMat;
     }
Index: orxonox/branches/importer/importer/material.h
===================================================================
--- orxonox/branches/importer/importer/material.h	(revision 2795)
+++ orxonox/branches/importer/importer/material.h	(revision 2804)
@@ -1,4 +1,7 @@
 #ifndef _MATERIAL_H
 #define _MATERIAL_H
+
+extern int verbose;
+
 #include <GL/gl.h>
 #include <GL/glu.h>
Index: orxonox/branches/importer/importer/object.cc
===================================================================
--- orxonox/branches/importer/importer/object.cc	(revision 2795)
+++ orxonox/branches/importer/importer/object.cc	(revision 2804)
@@ -22,6 +22,8 @@
 bool Object::importFile (char* fileName)
 {
-  objFile = fileName;
-  this->readFromObjFile (objFile);
+  if (verbose >=3)
+    printf("preparing to read in file: %s\n", fileName);   
+  objFileName = fileName;
+  this->readFromObjFile (objFileName);
   return true;
 }
@@ -29,4 +31,6 @@
 bool Object::initialize (void)
 {
+  if (verbose >=3)
+    printf("new 3D-Object is being created\n"); 
   faceMode = -1;
   if ( (listNumber = glGenLists(1)) == 0 )
@@ -45,4 +49,6 @@
 bool Object::finalize(void)
 {
+  if (verbose >=3)
+    printf("finalizing the 3D-Object\n"); 
   glEndList();
   return true;
@@ -51,4 +57,6 @@
 void Object::draw (void)
 {
+  if (verbose >=3)
+    printf("drawing the 3D-Object\n"); 
   glCallList (listNumber);
 }
@@ -60,8 +68,9 @@
   if (!OBJ_FILE->is_open())
     {
-      printf ("unable to open file: %s\n", fileName);
+      if (verbose >=1)
+	printf ("unable to open .OBJ file: %s\n", fileName);
       return false;
     }
-  
+  objFileName = fileName;
   char Buffer[500];
   vertices = new Array();
@@ -70,5 +79,6 @@
     {
       OBJ_FILE->getline(Buffer, 500);
-      //      printf("%s\n", Buffer);
+      if (verbose >=4)
+	printf ("Read input line: %s\n",Buffer);
       
 
@@ -125,4 +135,6 @@
   char subbuffer3[20];
   sscanf (vertexString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3);
+  if (verbose >= 3)
+    printf ("reading in a vertex: %s %s %s\n", subbuffer1, subbuffer2, subbuffer3);
   vertices->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3));
   return true;
@@ -145,5 +157,4 @@
   char subbuffer4[20] ="";
   sscanf (faceString, "%s %s %s %s", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
-  //  printf("%s, %s, %s\n", subbuffer1,subbuffer2,subbuffer3);
   if (!strcmp(subbuffer4, ""))
     {
@@ -156,5 +167,6 @@
       
       faceMode = 3;
-      //printf ("triag: %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3);
+      if (verbose >=3)
+	printf ("found triag: %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3);
       addGLElement(subbuffer1);
       addGLElement(subbuffer2);
@@ -171,5 +183,6 @@
 	}
       faceMode = 4;
-      //      printf ("quad: %s, %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
+      if (verbose >=3 )
+	printf ("found quad: %s, %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
       addGLElement(subbuffer1);
       addGLElement(subbuffer2);
@@ -191,5 +204,6 @@
   normal[0] = '\0';
   normal ++;
-  
+  if (verbose >= 4)
+    printf ("importing grafical Element.... including to openGL\n");
   //glArrayElement(atoi(vertex)-1);
   glNormal3fv(normals->getArray() +(atoi(normal)-1)*3);
@@ -205,5 +219,6 @@
   char subbuffer3[20];
   sscanf (normalString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3);
-  //  printf("%s, %s, %s\n", subbuffer1,subbuffer2,subbuffer3);
+  if (verbose >=3 )
+    printf("found vertex-Normal %s, %s, %s\n", subbuffer1,subbuffer2,subbuffer3);
   normals->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3));
   return true;
@@ -215,8 +230,11 @@
   if (!MTL_FILE->is_open())
     {
-      printf ("unable to open file: %s\n", mtlFile);
+      if (verbose >= 1)
+	printf ("unable to open file: %s\n", mtlFile);
       return false;
     }
-  
+  mtlFileName = mtlFile;
+  if (verbose >=2)
+    printf ("Opening mtlFile: %s\n", mtlFileName);
   char Buffer[500];
   vertices = new Array();
@@ -226,5 +244,6 @@
     {
       MTL_FILE->getline(Buffer, 500);
-      //      printf("%s\n", Buffer);
+      if (verbose >= 4)
+	printf("found line in mtlFile: %s\n", Buffer);
       
 
@@ -265,6 +284,6 @@
     glEnd();
   faceMode = 0;
-  //printf ("%s\n", matString);
-  //  glColor3f((float)rand()/2000000000.0,(float)rand()/2000000000.0,(float)rand()/2000000000.0);
+  if (verbose >= 2)
+    printf ("using material %s for coming Faces.\n", matString);
   material->search(matString)->select();
 }
Index: orxonox/branches/importer/importer/object.h
===================================================================
--- orxonox/branches/importer/importer/object.h	(revision 2795)
+++ orxonox/branches/importer/importer/object.h	(revision 2804)
@@ -8,4 +8,6 @@
 #include "material.h"
 #include <fstream.h>
+
+extern int verbose;
 
 class Object
@@ -30,5 +32,6 @@
   Array* colors;
   Array* normals;
-  char* objFile;
+  char* objFileName;
+  char* mtlFileName;
   int faceMode;
   bool readVertices;
Index: orxonox/branches/importer/importer/windowHandler.h
===================================================================
--- orxonox/branches/importer/importer/windowHandler.h	(revision 2795)
+++ orxonox/branches/importer/importer/windowHandler.h	(revision 2804)
@@ -1,4 +1,6 @@
 #ifndef _WINDOWHANDLER_H
 #define _WINDOWHANDLER_H
+
+extern int verbose;
 
 #include <GL/gl.h>
