Index: branches/bsp_model/src/lib/graphics/importer/bsp_file.cc
===================================================================
--- branches/bsp_model/src/lib/graphics/importer/bsp_file.cc	(revision 7509)
+++ branches/bsp_model/src/lib/graphics/importer/bsp_file.cc	(revision 7510)
@@ -1,12 +1,12 @@
 /*
    orxonox - the future of 3D-vertical-scrollers
- 
+
    Copyright (C) 2006 orx
- 
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
    any later version.
- 
+
    ### File Specific:
    main-programmer: bottac@ee.ethz.ch
@@ -222,18 +222,18 @@
       PRINTF(4)("BSP FILE: Texture 0: %s. \n", &this->textures[8+ 72*i]);
     this->load_textures();
-    
+
     // Load the lightMaps
     this->glLightMapTextures = new GLuint[this->numLightMaps];
     for(int i = 0; i < this->numLightMaps; i++)
       this->glLightMapTextures[i] = this->loadLightMapToGL(this->lightMaps[i]);
-    
+
     //Create white texture for if no lightmap specified
     glGenTextures(1, &this->whiteLightMap);
     glBindTexture(GL_TEXTURE_2D, this->whiteLightMap);
-	//Create texture
+        //Create texture
     this->whiteTexture[0]=255;
     this->whiteTexture[1]=255;
     this->whiteTexture[2]=255;
-    
+
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
@@ -244,5 +244,5 @@
 
 
-  
+
     /* control the mipmap levels */
     glTexParameterf(GL_TEXTURE_ENV, GL_TEXTURE_MIN_LOD, 5);
@@ -260,8 +260,8 @@
                  (const GLvoid *)&(this->whiteTexture));
 
-    gluBuild2DMipmaps(	GL_TEXTURE_2D, GL_RGBA8, 1, 1,
+    gluBuild2DMipmaps(  GL_TEXTURE_2D, GL_RGBA8, 1, 1,
                        GL_RGB, GL_FLOAT,(const GLvoid *) &(this->whiteTexture));
-    
-    
+
+
 
     // Get the number of patches
@@ -324,5 +324,5 @@
   float z1 =(((plane *) this->planes) [planeIndex]).z;
   thisNode->leafIndex = 0;
-  thisNode->d	       = (((plane *) this->planes) [planeIndex]).d;
+  thisNode->d          = (((plane *) this->planes) [planeIndex]).d;
 
   thisNode->plane = Vector(x1,y1,z1);
@@ -464,5 +464,5 @@
       PRINTF(0)("BSP FILE: gefunden . \n");
       this->Materials[i] =this->loadMat(fileName);
-      
+
     }
 
@@ -480,5 +480,5 @@
       continue;
     }
-    // 	Default Material
+    //  Default Material
     this->Materials[i].mat = new Material();
     this->Materials[i].mat->setDiffuse(0.1,0.1,0.1);
@@ -503,5 +503,5 @@
   if(this->testSurf != NULL) {
     if(this->testSurf->format->Amask != 0 ) tmpAMat.alpha = true;
-    else 				       tmpAMat.alpha = false;
+    else                                       tmpAMat.alpha = false;
   } else   tmpAMat.alpha = false;
 
@@ -510,6 +510,6 @@
   tmp->setAmbient(1.0,1.0,1.0 );
   tmp->setSpecular(1.0,1.0,1.0);
-  //	tmp->setShininess(.5);
-  //	tmp->setTransparency(1.0);
+  //    tmp->setShininess(.5);
+  //    tmp->setTransparency(1.0);
 
   tmp->setDiffuseMap(mat);
@@ -539,9 +539,9 @@
   scale*=255.0;
   sc*=scale;
-    ((unsigned char *)(&lightMapTexture))[i] = (unsigned char)sc; 
-    
-  
+    ((unsigned char *)(&lightMapTexture))[i] = (unsigned char)sc;
+
+
   }
-  
+
   glGenTextures(1, &lightMap);
   glBindTexture(GL_TEXTURE_2D,  lightMap);
@@ -569,5 +569,5 @@
                    (const GLvoid *)&lightMapTexture);
 
-   
+
    // build the MipMaps automaticaly
    errorCode = gluBuild2DMipmaps(GL_TEXTURE_2D,
@@ -579,5 +579,5 @@
                                  (const GLvoid *)&lightMapTexture
                                 );
-   
+
 
 
@@ -715,5 +715,5 @@
 
 
-          //Vertice[u*(tesselation+1)+v]=	temp[0]*((1.0f-px)*(1.0f-px))+ temp[1]*((1.0f-px)*px*2)+ temp[2]*(px*px);
+          //Vertice[u*(tesselation+1)+v]=       temp[0]*((1.0f-px)*(1.0f-px))+ temp[1]*((1.0f-px)*px*2)+ temp[2]*(px*px);
           Vertice[u*(level1)+v].position[0]=temp[0].position[0]*((1.0f-px)*(1.0f-px))+temp[1].position[0]*((1.0f-px)*px*2)+temp[2].position[0]*(px*px);
           Vertice[u*(level1)+v].position[1]=temp[0].position[1]*((1.0f-px)*(1.0f-px))+temp[1].position[1]*((1.0f-px)*px*2)+temp[2].position[1]*(px*px);
Index: branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
===================================================================
--- branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc	(revision 7509)
+++ branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc	(revision 7510)
@@ -1,12 +1,12 @@
 /*
    orxonox - the future of 3D-vertical-scrollers
- 
+
    Copyright (C) 2006 orx
- 
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
    any later version.
- 
+
    ### File Specific:
    main-programmer: bottac@ee.ethz.ch
@@ -51,10 +51,10 @@
   // Draw Debug Terrain
   /*
-  this->bspFile->Materials[0]->select(); 
+  this->bspFile->Materials[0]->select();
   for(int i = 0; i <  this->bspFile->numPatches ; i++)
-  	{
-  	 	this->bspFile->VertexArrayModels[i]->draw();
-   
-  	}
+        {
+                this->bspFile->VertexArrayModels[i]->draw();
+
+        }
   */
 
@@ -103,10 +103,10 @@
         if (f >=0 && !this->isAlreadyVisible(f)) {
           this->alreadyVisible[f] = true;
-          /*	if(ActLeaf->leafIndex == i)public final double readLEDouble()
-          	{
-          		this->alreadyVisible[i] = false;
-          		this->draw_debug_face(f);
-          		this->alreadyVisible[i] = true;
-          	}  
+          /*    if(ActLeaf->leafIndex == i)public final double readLEDouble()
+                {
+                        this->alreadyVisible[i] = false;
+                        this->draw_debug_face(f);
+                        this->alreadyVisible[i] = true;
+                }
                 else */
           addFace(f); // "visibleFaces.append(f)"
@@ -131,10 +131,10 @@
       leaf& curLeaf =  (this->bspFile->leaves)[i] ;
       cluster =  curLeaf.cluster;
-      
+
       if(cluster <0) continue;
       v = ((viscluster *  ( ((int *)this->bspFile->visData)[1]) ) + (cluster / 8));
       visSet =((unsigned char*) (this->bspFile->visData))[v+8];
-   
-      
+
+
       if( ((visSet) & ((unsigned char)1 <<(unsigned char) (cluster &  7))) == 0 )
       {
@@ -191,9 +191,9 @@
   // if(this->bspFile->Materials[curFace.texture] != NULL)
   //if(this->lastTex != curFace.texture) {
-    this->bspFile->Materials[curFace.texture].mat->select0();
+    this->bspFile->Materials[curFace.texture].mat->select();
   //   this->lastTex = curFace.texture;
   //}
-    
-    if(curFace.lm_index < 0) 
+
+    if(curFace.lm_index < 0)
     {
       glActiveTextureARB(GL_TEXTURE1_ARB);
@@ -207,5 +207,5 @@
     glEnable(GL_TEXTURE_2D);
     }
-    
+
     glColor4f(3.0,3.0,3.0,0.9);
   glEnableClientState(GL_VERTEX_ARRAY );
@@ -213,17 +213,17 @@
   glEnableClientState(GL_NORMAL_ARRAY );
   //  glEnableClientState(GL_COLOR_ARRAY);
-  
+
 
   glVertexPointer(3, GL_FLOAT, stride, &(curVertex[offset].position[0]));
-  
+
   glClientActiveTextureARB(GL_TEXTURE0_ARB);
   glTexCoordPointer(2, GL_FLOAT, stride, &(curVertex[offset].texcoord[0]));
   glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-  
+
   glClientActiveTextureARB(GL_TEXTURE1_ARB);
   glTexCoordPointer(2, GL_FLOAT, stride, &(curVertex[offset].texcoord[1]));
   glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 
-  
+
   glNormalPointer( GL_FLOAT, stride, &(curVertex[offset].normal[0]));
   // glColorPointer(4, GL_BYTE, stride, &(curVertex[offset].color[0]));
@@ -288,11 +288,11 @@
 {
   if(this->lastTex != Face->texture) {
-    this->bspFile->Materials[Face->texture].mat->select0();
+    this->bspFile->Materials[Face->texture].mat->select();
     this->lastTex = Face->texture;
   }
-  
-  
-  
-  if(Face->lm_index < 0) 
+
+
+
+  if(Face->lm_index < 0)
   {
     glActiveTextureARB(GL_TEXTURE1_ARB);
@@ -307,5 +307,5 @@
 }
     glColor4f(3.0,3.0,3.0,0.9);
-  
+
   glEnable( GL_AUTO_NORMAL);
   glEnableClientState(GL_VERTEX_ARRAY );
@@ -314,21 +314,21 @@
     glFrontFace(GL_CW);
     //PRINTF(0)("BSP Manager: Face->size[0]: %i . \n", Face->size[0]);
-  
- 
+
+
     glEnableClientState(GL_NORMAL_ARRAY );
 
     glVertexPointer(3, GL_FLOAT,44, &((((BspVertex*)(this->bspFile->patchVertice))[8*8*(Face->meshvert+i)]).position[0]));
-    
-    
+
+
     glClientActiveTextureARB(GL_TEXTURE0_ARB);
     glTexCoordPointer(2, GL_FLOAT, 44, &((((BspVertex*)(this->bspFile->patchVertice))[8*8*(Face->meshvert+i)]).texcoord[0][0]));
     glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 
-    
+
     glClientActiveTextureARB(GL_TEXTURE1_ARB);
     glTexCoordPointer(2, GL_FLOAT, 44, &((((BspVertex*)(this->bspFile->patchVertice))[8*8*(Face->meshvert+i)]).texcoord[1][0]));
     glEnableClientState(GL_TEXTURE_COORD_ARRAY);
 
-    
+
     glNormalPointer( GL_FLOAT, 44,&((((BspVertex*)(this->bspFile->patchVertice))[8*8*(Face->meshvert+i)]).normal[0]) );
 
@@ -344,5 +344,5 @@
                      & (     (((GLuint*)  (this->bspFile->patchIndexes))[7*8*2*(Face->meshvert+i)+ row*2*8]  ))  );
     }
-   
+
     glFrontFace(GL_CCW);
   }
@@ -352,7 +352,7 @@
   glDisableClientState(GL_VERTEX_ARRAY );
   glDisableClientState(GL_TEXTURE_COORD_ARRAY );
-  
+
   glBegin(GL_QUADS);
-  
+
   glEnd();
 }
@@ -406,23 +406,23 @@
 
     /*
-    	for(int i = 0; i < camLeaf.n_leafbrushes && i < 10; i++ )
-    	{
-    		brush& curBrush = ((brush*)(this->bspFile->brushes))[(camLeaf.leafbrush_first +i)%this->bspFile->numLeafBrushes];
-    		if(curBrush.n_brushsides < 0) return;
-    		for(int j = 0; j < curBrush.n_brushsides; j++)
-    		{
-    		float dist = -0.1;
-    		brushside& curBrushSide = ((brushside*)(this->bspFile->brushSides))[(curBrush.brushside +j)%this->bspFile->numBrushSides];
-    		plane& 	    testPlane = ((plane*)(this->bspFile->planes))[curBrushSide.plane % this->bspFile->numPlanes];
-    		dist = testPlane.x * this->cam.x +  testPlane.y * this->cam.y  +  testPlane.z * this->cam.z   -testPlane.d ; 
-    		
-    		if(dist < -0.01f) dist = -1.0f *dist;
-    		if(dist < 1.0f){
-    				this->drawDebugCube(&this->cam);
-    				return;
-    			      }
-    		}
-    			
-    	} */
+        for(int i = 0; i < camLeaf.n_leafbrushes && i < 10; i++ )
+        {
+                brush& curBrush = ((brush*)(this->bspFile->brushes))[(camLeaf.leafbrush_first +i)%this->bspFile->numLeafBrushes];
+                if(curBrush.n_brushsides < 0) return;
+                for(int j = 0; j < curBrush.n_brushsides; j++)
+                {
+                float dist = -0.1;
+                brushside& curBrushSide = ((brushside*)(this->bspFile->brushSides))[(curBrush.brushside +j)%this->bspFile->numBrushSides];
+                plane&      testPlane = ((plane*)(this->bspFile->planes))[curBrushSide.plane % this->bspFile->numPlanes];
+                dist = testPlane.x * this->cam.x +  testPlane.y * this->cam.y  +  testPlane.z * this->cam.z   -testPlane.d ;
+
+                if(dist < -0.01f) dist = -1.0f *dist;
+                if(dist < 1.0f){
+                                this->drawDebugCube(&this->cam);
+                                return;
+                              }
+                }
+
+        } */
 
   }
Index: branches/bsp_model/src/lib/graphics/importer/material.cc
===================================================================
--- branches/bsp_model/src/lib/graphics/importer/material.cc	(revision 7509)
+++ branches/bsp_model/src/lib/graphics/importer/material.cc	(revision 7510)
@@ -45,5 +45,4 @@
   this->setTransparency(1.0);
 
-  this->diffuseTexture = NULL;
   this->ambientTexture = NULL;
   this->specularTexture = NULL;
@@ -61,8 +60,11 @@
   PRINTF(5)("delete Material %s.\n", this->getName());
 
-  if (this->diffuseTexture != NULL)
-  {
-    ResourceManager::getInstance()->unload(this->diffuseTexture);
-  }
+  while(!this->textures.empty())
+  {
+    if (this->textures.back() != NULL)
+      ResourceManager::getInstance()->unload(this->textures.back());
+    this->textures.pop_back();
+  }
+
   if (this->ambientTexture != NULL)
     ResourceManager::getInstance()->unload(this->ambientTexture);
@@ -71,52 +73,56 @@
 }
 
-Material& Material::operator=(const Material& m)
-{
-  this->setIllum(m.illumModel);
-  this->setDiffuse(m.diffuse[0],m.diffuse[1],m.diffuse[2]);
-  this->setAmbient(m.ambient[0],m.ambient[1],m.ambient[2]);
-  this->setSpecular(m.specular[0],m.specular[1],m.specular[2]);
-  this->setShininess(m.shininess);
-  this->setTransparency(m.transparency);
-
-  if (this->diffuseTexture != NULL)
-    ResourceManager::getInstance()->unload(this->diffuseTexture);
-  if (m.diffuseTexture != NULL)
-    this->diffuseTexture = (Texture*)ResourceManager::getInstance()->copy(m.diffuseTexture);
-  this->ambientTexture = NULL; /// FIXME
-  this->specularTexture = NULL; /// FIXME
-
-  this->setName(m.getName());
-}
- 
-bool Material::select0() const
-{
-  glActiveTextureARB(GL_TEXTURE0_ARB);
-  glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
-  glEnable(GL_TEXTURE_2D); 
-  
-}
+
+/// TODO FIX THIS
+// Material& Material::operator=(const Material& m)
+// {
+//   this->setIllum(m.illumModel);
+//   this->setDiffuse(m.diffuse[0],m.diffuse[1],m.diffuse[2]);
+//   this->setAmbient(m.ambient[0],m.ambient[1],m.ambient[2]);
+//   this->setSpecular(m.specular[0],m.specular[1],m.specular[2]);
+//   this->setShininess(m.shininess);
+//   this->setTransparency(m.transparency);
+//
+//   if (this->diffuseTexture != NULL)
+//     ResourceManager::getInstance()->unload(this->diffuseTexture);
+//   if (m.diffuseTexture != NULL)
+//     this->diffuseTexture = (Texture*)ResourceManager::getInstance()->copy(m.diffuseTexture);
+//   this->ambientTexture = NULL; /// FIXME
+//   this->specularTexture = NULL; /// FIXME
+//
+//   this->setName(m.getName());
+// }
+
+const GLenum Material::glTextureArbs[] =
+  {
+    GL_TEXTURE0_ARB,
+    GL_TEXTURE1_ARB,
+    GL_TEXTURE2_ARB,
+    GL_TEXTURE3_ARB,
+    GL_TEXTURE4_ARB,
+    GL_TEXTURE5_ARB,
+    GL_TEXTURE6_ARB,
+    GL_TEXTURE7_ARB
+  };
+
 
 /**
  *  sets the material with which the following Faces will be painted
  */
-bool Material::select () const
+bool Material::select() const
 {
   // setting diffuse color
   glColor4f (diffuse[0], diffuse[1], diffuse[2], this->transparency);
-//  glMaterialfv(GL_FRONT, GL_DIFFUSE, this->diffuse);
-
   // setting ambient color
   glMaterialfv(GL_FRONT, GL_AMBIENT, this->ambient);
-
   // setting up Sprecular
   glMaterialfv(GL_FRONT, GL_SPECULAR, this->specular);
-
   // setting up Shininess
   glMaterialf(GL_FRONT, GL_SHININESS, this->shininess);
 
+
   // setting the transparency
   if (this->transparency < 1.0 ||       /* This allows alpha blending of 2D textures with the scene */
-      (this->diffuseTexture && this->diffuseTexture->hasAlpha()))
+      (likely(!this->textures.empty() && this->textures[0] != NULL) && this->textures[0]->hasAlpha()))
   {
     glEnable(GL_BLEND);
@@ -124,8 +130,7 @@
   }
   else
-    {
-      glDisable(GL_BLEND);
-      //glColor4f(*(this->diffuse), *(this->diffuse+1), *(this->diffuse+2), 1);
-    }
+  {
+    glDisable(GL_BLEND);
+  }
 
 
@@ -136,14 +141,25 @@
     glShadeModel(GL_SMOOTH);
 
-  if (this->diffuseTexture != NULL)
+
+  for(unsigned int i = 0; i < this->textures.size(); ++i)
+  {
+    if (likely(this->textures[i] != NULL))
     {
+      glActiveTexture(Material::glTextureArbs[i]);
       glEnable(GL_TEXTURE_2D);
-      glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
+      glBindTexture(GL_TEXTURE_2D, this->textures[i]->getTexture());
     }
-  else
-    {
-      glDisable(GL_TEXTURE_2D);
-      glBindTexture(GL_TEXTURE_2D, 0);
-    }
+  }
+
+  /*  if (this->diffuseTexture != NULL)
+      {
+        glEnable(GL_TEXTURE_2D);
+        glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
+      }
+    else
+      {
+        glDisable(GL_TEXTURE_2D);
+        glBindTexture(GL_TEXTURE_2D, 0);
+      }*/
 }
 
@@ -233,5 +249,5 @@
   this->specular[2] = b;
   this->specular[3] = 1.0;
- }
+}
 
 /**
@@ -296,16 +312,25 @@
  * @param dMap the Name of the Image to Use
 */
-void Material::setDiffuseMap(const std::string& dMap, GLenum target)
-{
+void Material::setDiffuseMap(const std::string& dMap, GLenum target, unsigned int textureNumber)
+{
+  assert(textureNumber < Material::getMaxTextureUnits());
+
   PRINTF(5)("setting Diffuse Map %s\n", dMap);
-  if (this->diffuseTexture != NULL)
-    ResourceManager::getInstance()->unload(this->diffuseTexture);
+  if (this->textures.size() > textureNumber && this->textures[textureNumber] != NULL)
+    ResourceManager::getInstance()->unload(this->textures[textureNumber]);
+
+  if (this->textures.size() <= textureNumber)
+    this->textures.resize(textureNumber+1, NULL);
 
   //! @todo check if RESOURCE MANAGER is availiable
-  //! @todo Textures from .mtl-file need special care.
   if (!dMap.empty())
-    this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target);
+  {
+
+    this->textures[textureNumber] = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target);
+  }
   else
-    this->diffuseTexture = NULL;
+  {
+    this->textures[textureNumber] = NULL;
+  }
 }
 
@@ -339,4 +364,12 @@
 void Material::setBump(const std::string& bump)
 {
-
-}
+}
+
+
+
+int Material::getMaxTextureUnits()
+{
+  int maxTexUnits = 0;
+  glGetIntegerv(GL_MAX_TEXTURE_UNITS, &maxTexUnits);
+  return maxTexUnits;
+}
Index: branches/bsp_model/src/lib/graphics/importer/material.h
===================================================================
--- branches/bsp_model/src/lib/graphics/importer/material.h	(revision 7509)
+++ branches/bsp_model/src/lib/graphics/importer/material.h	(revision 7510)
@@ -14,7 +14,6 @@
 #endif /* HAVE_CONFIG_H */
 
-#ifndef NULL
-#define NULL 0            //!< a pointer to NULL
-#endif
+#include <vector>
+
 
 #include "texture.h"
@@ -25,36 +24,45 @@
 class Material : public BaseObject
 {
- public:
-  Material (const std::string& mtlName = "");
-  virtual ~Material ();
+  public:
+    Material (const std::string& mtlName = "");
+    virtual ~Material ();
 
-  Material& operator=(const Material& material);
+    Material& operator=(const Material& material);
 
-  bool select () const;
-  bool select0 () const;
-      
-  void setIllum (int illum);
-  void setIllum (char* illum);
-  int getIllumModel() const { return this->illumModel; };
-  void setDiffuse (float r, float g, float b);
-  void setDiffuse (char* rgb);
-  void setAmbient (float r, float g, float b);
-  void setAmbient (char* rgb);
-  void setSpecular (float r, float g, float b);
-  void setSpecular (char* rgb);
-  void setShininess (float shini);
-  void setShininess (char* shini);
-  void setTransparency (float trans);
-  void setTransparency (char* trans);
-  void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; };
+    bool select () const;
 
- // MAPPING //
-  void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D);
-  void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
-  void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D);
-  void setBump(const std::string& bump);
-  GLuint getDiffuseTexture() const { return (this->diffuseTexture)? this->diffuseTexture->getTexture() : 0; };
+    void setIllum (int illum);
+    int getIllumModel() const { return this->illumModel; };
+    void setDiffuse (float r, float g, float b);
+    void setAmbient (float r, float g, float b);
+    void setSpecular (float r, float g, float b);
+    void setShininess (float shini);
+    void setTransparency (float trans);
+    void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; };
 
-  static void addTexturePath(const std::string& pathName);
+
+    // TODO Move them out of here
+    void setIllum (char* illum);
+    void setDiffuse (char* rgb);
+    void setAmbient (char* rgb);
+    void setSpecular (char* rgb);
+    void setShininess (char* shini);
+    void setTransparency (char* trans);
+
+
+    // MAPPING //
+    void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
+
+    void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
+    void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D);
+    void setBump(const std::string& bump);
+    GLuint getDiffuseTexture(unsigned int i = 0) const { return (this->textures.size() > i)? this->textures[i]->getTexture() : 0; };
+
+    static void addTexturePath(const std::string& pathName);
+
+  public:
+    static const GLenum glTextureArbs[];  //!< The Texture ARB's
+
+    static int getMaxTextureUnits();
 
   private:
@@ -68,7 +76,10 @@
     GLenum      tFactor;
 
-    Texture*    diffuseTexture;   //!< The diffuse texture of the Material.
+    std::vector<Texture*> textures; //!< An Array of Textures.
+
     Texture*    ambientTexture;   //!< The ambient texture of the Material.
     Texture*    specularTexture;  //!< The specular texture of the Material.
+
+
 };
 #endif
Index: branches/bsp_model/src/lib/graphics/render2D/billboard.cc
===================================================================
--- branches/bsp_model/src/lib/graphics/render2D/billboard.cc	(revision 7509)
+++ branches/bsp_model/src/lib/graphics/render2D/billboard.cc	(revision 7510)
@@ -78,5 +78,5 @@
 void Billboard::loadParams(const TiXmlElement* root)
 {
-  LoadParam(root, "texture", this->material, Material, setDiffuseMap)
+  LoadParam(root, "texture", this, Billboard, setTexture)
       .describe("the texture-file to load onto the Billboard");
 
Index: branches/bsp_model/src/world_entities/weapons/crosshair.cc
===================================================================
--- branches/bsp_model/src/world_entities/weapons/crosshair.cc	(revision 7509)
+++ branches/bsp_model/src/world_entities/weapons/crosshair.cc	(revision 7510)
@@ -79,5 +79,5 @@
   EventListener::loadParams(root);
 
-  LoadParam(root, "texture", this->material, Material, setDiffuseMap)
+  LoadParam(root, "texture", this, Crosshair, setTexture)
       .describe("the texture-file to load onto the Crosshair");
 
