Index: orxonox/trunk/importer/framework.cc
===================================================================
--- orxonox/trunk/importer/framework.cc	(revision 3069)
+++ orxonox/trunk/importer/framework.cc	(revision 3070)
@@ -87,4 +87,6 @@
   glLightfv(GL_LIGHT1, GL_SPECULAR, whiteLight);
   
+
+  glEnable(GL_TEXTURE_2D);
   rotatorP = .0;
   rotatorV = .0;
Index: orxonox/trunk/importer/material.cc
===================================================================
--- orxonox/trunk/importer/material.cc	(revision 3069)
+++ orxonox/trunk/importer/material.cc	(revision 3070)
@@ -84,4 +84,9 @@
   setShininess(2.0);
   setTransparency(0.0);
+
+  diffuseTextureSet = false;
+  ambientTextureSet = false;
+  specularTextureSet = false;
+
   
 }
@@ -243,4 +248,83 @@
   setTransparency (atof(tr));
 }
+
+// MAPPING //
+
+/**
+   \brief Sets the Materials Diffuse Map
+   \param dMap the Name of the Image to Use
+*/
+void Material::setDiffuseMap(char* dMap)
+{
+  if (verbose>=2)
+    printf ("setting Diffuse Map %s\n", dMap);
+
+  diffuseTextureSet = loadBMP(dMap, &diffuseTexture);
+
+}
+
+/**
+   \brief Sets the Materials Ambient Map
+   \param aMap the Name of the Image to Use
+*/
+void Material::setAmbientMap(char* aMap)
+{
+  SDL_Surface* ambientMap;
+
+}
+
+/**
+   \brief Sets the Materials Specular Map
+   \param sMap the Name of the Image to Use
+*/
+void Material::setSpecularMap(char* sMap)
+{
+  SDL_Surface* specularMap;
+
+}
+
+/**
+   \brief Sets the Materials Bumpiness
+   \param bump the Name of the Image to Use
+*/
+void Material::setBump(char* bump)
+{
+
+}
+
+/**
+   \brief reads in a Windows BMP-file, and imports it to openGL.
+   \param bmpName The name of the Image to load.
+   \param texture A pointer to the Texture which should be read to.
+*/
+bool Material::loadBMP (char* bmpName, GLuint* texture)
+{
+  SDL_Surface* map;
+  if (map = SDL_LoadBMP(bmpName))
+    {
+
+      glGenTextures( 1, texture );
+      /* Typical Texture Generation Using Data From The Bitmap */
+      glBindTexture( GL_TEXTURE_2D, *texture );
+      
+      /* Generate The Texture */
+      glTexImage2D( GL_TEXTURE_2D, 0, 3, map->w,
+		    map->h, 0, GL_BGR,
+		    GL_UNSIGNED_BYTE, map->pixels );
+      
+      /* Linear Filtering */
+      glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+      glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+      if ( map )
+	SDL_FreeSurface( map );
+
+      return true;
+    }
+  else
+    return false;
+}
+
+
+
 
 /**
@@ -294,3 +378,7 @@
   else if (illumModel >= 2)
     glShadeModel(GL_SMOOTH);
-}
+
+  if (diffuseTextureSet)
+    glBindTexture(GL_TEXTURE_2D, diffuseTexture);
+  
+}
Index: orxonox/trunk/importer/material.h
===================================================================
--- orxonox/trunk/importer/material.h	(revision 3069)
+++ orxonox/trunk/importer/material.h	(revision 3070)
@@ -11,4 +11,5 @@
 #include <GL/gl.h>
 #include <GL/glu.h>
+#include <SDL/SDL.h>
 #include <stdlib.h>
 #include <fstream>
@@ -25,4 +26,11 @@
   ~Material ();
 
+  GLuint diffuseTexture;
+  GLuint ambientTexture;
+  GLuint specularTexture;
+  
+  bool diffuseTextureSet;
+  bool ambientTextureSet;
+  bool specularTextureSet;
 
   void setName (char* mtlName);
@@ -40,4 +48,13 @@
   void setTransparency (float trans);
   void setTransparency (char* trans);
+
+  // MAPPING //
+  void setDiffuseMap(char* dMap);
+  void setAmbientMap(char* aMap);
+  void setSpecularMap(char* sMap);
+  void setBump(char* bump);
+
+  bool loadBMP (char* bmpName, GLuint* texture);
+
 
   Material* search (char* mtlName);
Index: orxonox/trunk/importer/object.cc
===================================================================
--- orxonox/trunk/importer/object.cc	(revision 3069)
+++ orxonox/trunk/importer/object.cc	(revision 3070)
@@ -575,8 +575,26 @@
 	  tmpMat->setTransparency(Buffer+2);
 	}
-      else if (!strncpy(Buffer, "Tf ", 3))
+      else if (!strncmp(Buffer, "Tf ", 3))
 	{
 	  tmpMat->setTransparency(Buffer+3);
 	}
+      
+      else if (!strncmp(Buffer, "map_Kd ", 7))
+	{
+	  tmpMat->setDiffuseMap(Buffer+7);
+	}
+      else if (!strncmp(Buffer, "map_Ka ", 7))
+	{
+	  tmpMat->setAmbientMap(Buffer+7);
+	}
+      else if (!strncmp(Buffer, "map_Ks ", 7))
+	{
+	  tmpMat->setSpecularMap(Buffer+7);
+	}
+      else if (!strncmp(Buffer, "bump ", 5))
+	{
+	  tmpMat->setBump(Buffer+7);
+	}
+     
 
     }
