Index: branches/fontdata/src/lib/graphics/importer/material.cc
===================================================================
--- branches/fontdata/src/lib/graphics/importer/material.cc	(revision 8757)
+++ branches/fontdata/src/lib/graphics/importer/material.cc	(revision 8758)
@@ -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: branches/fontdata/src/lib/graphics/importer/material.h
===================================================================
--- branches/fontdata/src/lib/graphics/importer/material.h	(revision 8757)
+++ branches/fontdata/src/lib/graphics/importer/material.h	(revision 8758)
@@ -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: branches/fontdata/src/lib/graphics/importer/texture.cc
===================================================================
--- branches/fontdata/src/lib/graphics/importer/texture.cc	(revision 8757)
+++ branches/fontdata/src/lib/graphics/importer/texture.cc	(revision 8758)
@@ -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: branches/fontdata/src/lib/graphics/importer/texture.h
===================================================================
--- branches/fontdata/src/lib/graphics/importer/texture.h	(revision 8757)
+++ branches/fontdata/src/lib/graphics/importer/texture.h	(revision 8758)
@@ -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: branches/fontdata/src/lib/graphics/importer/texture_data.h
===================================================================
--- branches/fontdata/src/lib/graphics/importer/texture_data.h	(revision 8757)
+++ branches/fontdata/src/lib/graphics/importer/texture_data.h	(revision 8758)
@@ -43,3 +43,5 @@
 };
 
+typedef CountPointer<TextureData> TextureDataPointer;
+
 #endif /* _TEXTURE_DATA_H */
Index: branches/fontdata/src/lib/graphics/text_engine/font.cc
===================================================================
--- branches/fontdata/src/lib/graphics/text_engine/font.cc	(revision 8757)
+++ branches/fontdata/src/lib/graphics/text_engine/font.cc	(revision 8758)
@@ -50,4 +50,5 @@
     this->loadFontFromTTF(fontFile, renderSize);
 }
+
 
 /**
@@ -108,4 +109,13 @@
 { }
 
+Font& Font::operator=(const Font& font)
+{
+  this->data = font.data;
+  this->setDiffuseMap(font.data->texData);
+
+  return *this;
+};
+
+
 /**
  * @brief initializes a Font (with default values)
@@ -113,4 +123,6 @@
 void Font::init()
 {
+  this->setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
   this->setClassID(CL_FONT, "Font");
   if (Font::defaultFontData.get() == NULL)
@@ -152,6 +164,5 @@
   {
     this->setStyle("c");
-    this->createFastTexture();
-    if (this->getTexture() != 0)
+    if (this->createFastTexture())
       return true;
     else
@@ -186,7 +197,7 @@
   if (newSurf != NULL)
   {
-    this->data->setSurface(newSurf);
-    this->data->setAlpha(hasAlpha);
-    this->data->setTexture(Texture::loadTexToGL(newSurf));
+    this->data->texData->setSurface(newSurf);
+    this->data->texData->setAlpha(hasAlpha);
+    this->setTexture(Texture::loadTexToGL(newSurf));
   }
   else
@@ -479,9 +490,24 @@
 //       sprintf( outName, "%s-glyphs.bmp", this->getName());
 //       SDL_SaveBMP(tmpSurf, outName);
-  this->data->setAlpha(true);
-  if (this->data->setSurface(tmpSurf))
-    (this->data->setTexture(Texture::loadTexToGL(tmpSurf)));
+  this->data->texData->setAlpha(true);
+  if (this->data->texData->setSurface(tmpSurf))
+    this->setTexture(Texture::loadTexToGL(tmpSurf));
   return true;
 }
+
+/**
+ * @brief the Internal implementation of setting up the Texture.
+ * @param texture the Texture to load.
+ * @returns true on success, false otherwise.
+ */
+bool Font::setTexture(GLuint texture)
+{
+  bool retVal = this->data->texData->setTexture(texture);
+  this->setDiffuseMap(data->texData, 0);
+  printf("this->texture %d\n", texture);
+  //printf(this->getT)
+  this->debug();
+  return retVal;
+};
 
 /**
@@ -577,4 +603,7 @@
 void Font::debug() const
 {
+  Material::debug();
+
+  PRINT(0)("TEST %p and %p\n", this->data.get(), this->data->texData.get());
   // print the loaded font's style
   int style = TTF_STYLE_NORMAL;
Index: branches/fontdata/src/lib/graphics/text_engine/font.h
===================================================================
--- branches/fontdata/src/lib/graphics/text_engine/font.h	(revision 8757)
+++ branches/fontdata/src/lib/graphics/text_engine/font.h	(revision 8758)
@@ -17,5 +17,5 @@
 
 //! A class to handle a Font of a certain ttf-File/image-file, Size.
-class Font : public BaseObject /* TODO Material it should be */
+class Font : public Material /* TODO Material it should be */
 {
 
@@ -27,5 +27,5 @@
   virtual ~Font();
 
-  Font& operator=(const Font& font) { this->data = font.data; return *this; };
+  Font& operator=(const Font& font);
   bool operator==(const Font& font) const { return this->data == font.data; };
 
@@ -42,7 +42,4 @@
   inline TTF_Font* getTTF() const { return this->data->getTTF(); };
 
-  inline GLuint getTexture() const { return this->data->getTexture(); };
-
-
   int getMaxHeight() const;
   int getMaxAscent() const;
@@ -52,18 +49,20 @@
   //inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; };
 
+
   void createAsciiImage(const std::string& fileName, unsigned int size) const;
 
-  void debug() const ;
+  void debug() const;
 
 private:
   void init();
+  void initGlyphs(Uint16 from, Uint16 count);
   bool getGlyphMetrics(Glyph* glyph, Uint16 character);
+  static void initDefaultFont();
 
+  int findOptimalFastTextureSize();
   bool createFastTexture();
 
-  void initGlyphs(Uint16 from, Uint16 count);
-  int findOptimalFastTextureSize();
+  bool setTexture(GLuint texture);
 
-  static void initDefaultFont();
 
 private:
Index: branches/fontdata/src/lib/graphics/text_engine/font_data.cc
===================================================================
--- branches/fontdata/src/lib/graphics/text_engine/font_data.cc	(revision 8757)
+++ branches/fontdata/src/lib/graphics/text_engine/font_data.cc	(revision 8758)
@@ -27,5 +27,7 @@
  */
 FontData::FontData()
+  : texData(new TextureData)
 {
+  printf("CREATE FONT_DATA\n");
   this->fontTTF = NULL;
   this->glyphArray = NULL;
Index: branches/fontdata/src/lib/graphics/text_engine/font_data.h
===================================================================
--- branches/fontdata/src/lib/graphics/text_engine/font_data.h	(revision 8757)
+++ branches/fontdata/src/lib/graphics/text_engine/font_data.h	(revision 8758)
@@ -48,9 +48,8 @@
 
 
-class FontData : public TextureData
+class FontData
 {
   friend class Font;
 public:
-  FontData();
   ~FontData();
 
@@ -65,4 +64,7 @@
 
 private:
+  FontData();
+
+private:
   TTF_Font*     fontTTF;             //!< The font we use for this.
   int           renderStyle;         //!< The Renderstyle
@@ -70,4 +72,6 @@
 
   Glyph**       glyphArray;          //!< An Array of all the Glyphs stored in the Array of Glyphs.
+
+  TextureDataPointer   texData;
 };
 
Index: branches/fontdata/src/lib/graphics/text_engine/limited_width_text.cc
===================================================================
--- branches/fontdata/src/lib/graphics/text_engine/limited_width_text.cc	(revision 8757)
+++ branches/fontdata/src/lib/graphics/text_engine/limited_width_text.cc	(revision 8758)
@@ -76,10 +76,12 @@
   glActiveTexture(GL_TEXTURE0);
 
-  glEnable(GL_BLEND);
-  glEnable(GL_TEXTURE_2D);
-  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
+//   glEnable(GL_BLEND);
+//   glEnable(GL_TEXTURE_2D);
+//   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+//   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
+//
+//   glBindTexture(GL_TEXTURE_2D, this->font().getTexture());
+  this->font().select();
 
-  glBindTexture(GL_TEXTURE_2D, this->font().getTexture());
   glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
   glRotatef(this->getAbsDir2D(), 0, 0, 1);
Index: branches/fontdata/src/lib/graphics/text_engine/multi_line_text.cc
===================================================================
--- branches/fontdata/src/lib/graphics/text_engine/multi_line_text.cc	(revision 8757)
+++ branches/fontdata/src/lib/graphics/text_engine/multi_line_text.cc	(revision 8758)
@@ -76,5 +76,5 @@
   glActiveTexture(GL_TEXTURE0);
 
-  glColor4fv(&this->color()[0]);
+/*  glColor4fv(&this->color()[0]);
   glEnable(GL_BLEND);
   glEnable(GL_TEXTURE_2D);
@@ -82,5 +82,6 @@
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
 
-  glBindTexture(GL_TEXTURE_2D, this->font().getTexture());
+  glBindTexture(GL_TEXTURE_2D, this->font().getTexture());*/
+  this->font().select();
   glTranslatef(this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
   glRotatef(this->getAbsDir2D(), 0, 0, 1);
Index: branches/fontdata/src/lib/graphics/text_engine/text.cc
===================================================================
--- branches/fontdata/src/lib/graphics/text_engine/text.cc	(revision 8757)
+++ branches/fontdata/src/lib/graphics/text_engine/text.cc	(revision 8758)
@@ -228,12 +228,13 @@
 
 
-  glActiveTexture(GL_TEXTURE0);
+/*  glActiveTexture(GL_TEXTURE0);
 
   glEnable(GL_BLEND);
-  glEnable(GL_TEXTURE_2D);
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
 
-  glBindTexture(GL_TEXTURE_2D, this->_font.getTexture());
+  glBindTexture(GL_TEXTURE_2D, this->_font.getTexture());*/
+  this->font().select();
+  //printf("Texture is : %d\n",);
   glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
   glRotatef(this->getAbsDir2D(), 0, 0, 1);
