Index: trunk/src/lib/graphics/importer/material.cc
===================================================================
--- trunk/src/lib/graphics/importer/material.cc	(revision 8751)
+++ trunk/src/lib/graphics/importer/material.cc	(revision 8761)
@@ -317,4 +317,19 @@
 }
 
+/**
+ * @brief Sets the Diffuse map of this Texture by a Texture-pointer.
+ * @param textureDataPointer The Texture-Data-Pointer to load.
+ * @param textureNumber The Texture-Number from 0 to GL_MAX_TEXTURE_UNITS
+ */
+void Material::setDiffuseMap(const TextureDataPointer& textureDataPointer, unsigned int textureNumber)
+{
+  assert(textureNumber < Material::getMaxTextureUnits());
+
+  if (this->textures.size() <= textureNumber)
+    this->textures.resize(textureNumber+1, Texture());
+
+  this->textures[textureNumber] = textureDataPointer;
+}
+
 
 /**
@@ -436,4 +451,28 @@
 }
 
+
+
+void Material::debug() const
+{
+  PRINT(0)("Debug Material: %s\n", this->getName());
+  PRINT(0)("illumModel: %d ; ShiniNess %f\n", this->illumModel, shininess);
+  PRINT(0)("diffuseColor: "); diffuse.debug();
+  PRINT(0)("ambientColor: "); ambient.debug();
+  PRINT(0)("diffuseColor: "); specular.debug();
+  PRINT(0)("Blending Properties: Source: %s, Destination: %s\n", blendFuncToString(sFactor).c_str(), blendFuncToString(tFactor).c_str());
+
+  PRINT(0)("Textures: %d loaded", textures.size());
+  if (!this->textures.empty())
+  {
+    PRINT(0)(" - ID's: ");
+    for (unsigned int i = 0; i < textures.size(); ++i)
+    {
+      PRINT(0)("%d ", textures[i].getTexture());
+    }
+  }
+  PRINT(0)("\n");
+}
+
+
 const GLenum Material::glTextureArbs[] =
 {
Index: trunk/src/lib/graphics/importer/material.h
===================================================================
--- trunk/src/lib/graphics/importer/material.h	(revision 8751)
+++ trunk/src/lib/graphics/importer/material.h	(revision 8761)
@@ -53,4 +53,5 @@
   // MAPPING //
   void setDiffuseMap(const Texture& texture, unsigned int textureNumber = 0);
+  void setDiffuseMap(const TextureDataPointer& texturePointer, unsigned int textureNumber = 0);
   void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
   void setSDLDiffuseMap(SDL_Surface *surface, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
@@ -67,7 +68,8 @@
   static void addTexturePath(const std::string& pathName);
 
-  const std::string& blendFuncToString(GLenum blendFunc);
-  GLenum stringToBlendFunc(const std::string& blendFuncString);
+  static const std::string& blendFuncToString(GLenum blendFunc);
+  static GLenum stringToBlendFunc(const std::string& blendFuncString);
 
+  void debug() const;
 
 public:
Index: trunk/src/lib/graphics/importer/texture.cc
===================================================================
--- trunk/src/lib/graphics/importer/texture.cc	(revision 8751)
+++ trunk/src/lib/graphics/importer/texture.cc	(revision 8761)
@@ -151,5 +151,5 @@
   this->setClassID(CL_TEXTURE, "Texture");
 
-  this->data = CountPointer<TextureData>(new TextureData());
+  this->data = TextureDataPointer(new TextureData());
 
   this->priority = 0.5;
@@ -173,4 +173,10 @@
   this->data = texture.data;
 
+  return *this;
+}
+
+Texture& Texture::operator=(const TextureDataPointer& textureDataPointer)
+{
+  this->data = textureDataPointer;
   return *this;
 }
Index: trunk/src/lib/graphics/importer/texture.h
===================================================================
--- trunk/src/lib/graphics/importer/texture.h	(revision 8751)
+++ trunk/src/lib/graphics/importer/texture.h	(revision 8761)
@@ -28,4 +28,5 @@
 
   Texture& operator=(const Texture& texture);
+  Texture& operator=(const TextureDataPointer& textureDataPointer);
 
   virtual ~Texture();
@@ -61,5 +62,5 @@
 
 private:
-  CountPointer<TextureData>     data;               //!< The TextureData
+  TextureDataPointer            data;               //!< The TextureData
   GLclampf                      priority;           //!< the priority of the current texture (used for garphics cards with limited mem)
 
Index: trunk/src/lib/graphics/importer/texture_data.h
===================================================================
--- trunk/src/lib/graphics/importer/texture_data.h	(revision 8751)
+++ trunk/src/lib/graphics/importer/texture_data.h	(revision 8761)
@@ -43,3 +43,5 @@
 };
 
+typedef CountPointer<TextureData> TextureDataPointer;
+
 #endif /* _TEXTURE_DATA_H */
