Index: trunk/src/lib/graphics/text_engine/font.h
===================================================================
--- trunk/src/lib/graphics/text_engine/font.h	(revision 5515)
+++ trunk/src/lib/graphics/text_engine/font.h	(revision 5767)
@@ -54,6 +54,4 @@
 class Font : public BaseObject
 {
-  friend class Text;
-
   public:
     Font(const char* fontFile,
@@ -77,4 +75,6 @@
     /** @returns the default Font */
     inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; };
+    /** @returns the a pointer to the TTF */
+    inline TTF_Font* getTTF() const { return this->fontTTF; };
 
     void createAsciiImage(const char* fileName);
Index: trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/text.cc	(revision 5515)
+++ trunk/src/lib/graphics/text_engine/text.cc	(revision 5767)
@@ -32,5 +32,5 @@
  * @param type The renderType to display this font in
  */
-Text::Text(const char* fontFile, unsigned int textSize, TEXT_RENDER_TYPE type)
+Text::Text(const char* fontFile, unsigned int textSize)
 {
   this->init();
@@ -38,5 +38,4 @@
   if (fontFile != NULL)
     this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE);
-  this->setType(type);
   this->setSizeY2D(this->size = textSize);
 }
@@ -49,5 +48,5 @@
 Text::~Text()
 {
-  if (this->font != NULL && this->font != Font::defaultFont)
+  if (this->font != NULL && this->font != Font::getDefaultFont())
     ResourceManager::getInstance()->unload(this->font);
 
@@ -68,9 +67,7 @@
   this->externText = NULL;
   this->setAlignment(TEXT_DEFAULT_ALIGNMENT);
-  this->texture = 0;
   this->blending = TEXT_DEFAULT_BLENDING;
   this->color = TEXT_DEFAULT_COLOR;
   this->size = TEXT_DEFAULT_SIZE;
-  this->setType(TEXT_RENDER_DYNAMIC);
 
   this->setText(NULL);
@@ -89,5 +86,5 @@
 
   // unloading the Font if we alrady have one loaded.
-  if (this->font != NULL && this->font != Font::defaultFont)
+  if (this->font != NULL && this->font != Font::getDefaultFont())
     ResourceManager::getInstance()->unload(this->font);
   this->font = NULL;
@@ -102,16 +99,4 @@
       PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile);
   }
-}
-
-/**
- *  sets the Type of this Text
- * @param type the type to set.
- */
-void Text::setType(TEXT_RENDER_TYPE type)
-{
-  if (this->font != NULL && this->font->fontTTF)
-    this->type = type;
-  else
-    this->type = TEXT_RENDER_DYNAMIC;
 }
 
@@ -167,35 +152,6 @@
         tmpText++;
       }
-      this->setSizeX2D(this->width = width *this->getSizeY2D());
+      this->setSizeX2D(width *this->getSizeY2D());
     }
-  }
-}
-
-
-/**
- *  creates a texture out of the given parameters !! TEXT_STATIC !! - mode
- *
- * this has to be called every time by the user, to if changes were made.
- * this is only for TEXT_STATIC-mode
- */
-void Text::createTexture()
-{
-  SDL_Surface* tmpSurf = NULL;
-  if (this->texture)
-    glDeleteTextures(1, &this->texture);
-  if (likely(this->font != NULL))
-  {
-    SDL_Color theColor = { (int)(this->color.x*255), (int)(this->color.y*255), (int)(this->color.z*255) };
-    tmpSurf = TTF_RenderText_Blended(this->font->fontTTF,
-                                     this->text,
-                                     theColor);
-  }
-  if (tmpSurf != NULL)
-  {
-    this->texture = loadTexture(tmpSurf, &this->texCoord);
-
-    this->width = tmpSurf->w;
-    this->height = tmpSurf->h;
-    SDL_FreeSurface(tmpSurf);
   }
 }
@@ -209,7 +165,7 @@
   // transform for alignment.
   if (this->getAlignment() == TEXT_ALIGN_RIGHT)
-    glTranslatef(-this->width, 0, 0);
+    glTranslatef(-this->getSizeX2D(), 0, 0);
   else if (this->getAlignment() == TEXT_ALIGN_CENTER || this->getAlignment() == TEXT_ALIGN_SCREEN_CENTER)
-    glTranslatef(-this->width/2, 0, 0);
+    glTranslatef(-this->getSizeX2D()/2, 0, 0);
 
   // drawing this Text.
@@ -222,74 +178,52 @@
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, GL_MODULATE );
 
-  if(likely(type & TEXT_RENDER_DYNAMIC ))
-  {
-    Glyph** glyphArray;
-    if (likely (this->font != NULL))
+  Glyph** glyphArray;
+  if (likely (this->font != NULL))
+  {
+    glyphArray = this->font->getGlyphArray();
+    glBindTexture(GL_TEXTURE_2D, font->getFastTextureID());
+  }
+  else
+  {
+    if (unlikely(Font::getDefaultFont() == NULL))
+      Font::initDefaultFont();
+    glyphArray = Font::getDefaultFont()->getGlyphArray();
+    glBindTexture(GL_TEXTURE_2D, Font::getDefaultFont()->getFastTextureID());
+  }
+  const char* tmpText = this->externText;
+  if (this->externText == NULL)
+    tmpText = this->text;
+  if (likely(tmpText != NULL))
+  {
+    glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
+    glRotatef(this->getAbsDir2D(), 0, 0, 1);
+    Glyph* tmpGlyph;
+    float posX = 0.0f;
+    while (likely(*tmpText != '\0'))
     {
-      glyphArray = this->font->getGlyphArray();
-      glBindTexture(GL_TEXTURE_2D, font->getFastTextureID());
+      if(likely((tmpGlyph = glyphArray[*tmpText]) != NULL))
+      {
+        glBegin(GL_QUADS);
+
+        glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]);
+        glVertex2d(posX, 0);
+
+        glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]);
+        glVertex2d(posX, this->size);
+
+        glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]);
+        glVertex2d(posX+tmpGlyph->width*this->size, this->size);
+
+        glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
+        glVertex2d(posX+tmpGlyph->width*this->size, 0);
+
+        glEnd();
+        glEndList();
+        posX += tmpGlyph->advance * this->size;
+      }
+      ++tmpText;
     }
-    else
-    {
-      if (unlikely(Font::getDefaultFont() == NULL))
-        Font::initDefaultFont();
-      glyphArray = Font::getDefaultFont()->getGlyphArray();
-      glBindTexture(GL_TEXTURE_2D, Font::getDefaultFont()->getFastTextureID());
-    }
-    const char* tmpText = this->externText;
-    if (this->externText == NULL)
-      tmpText = this->text;
-    if (likely(tmpText != NULL))
-    {
-      glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
-      glRotatef(this->getAbsDir2D(), 0, 0, 1);
-      Glyph* tmpGlyph;
-      float posX = 0.0f;
-      while (likely(*tmpText != '\0'))
-      {
-        if(likely((tmpGlyph = glyphArray[*tmpText]) != NULL))
-        {
-          glBegin(GL_QUADS);
-
-          glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]);
-          glVertex2d(posX, 0);
-
-          glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]);
-          glVertex2d(posX, this->size);
-
-          glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]);
-          glVertex2d(posX+tmpGlyph->width*this->size, this->size);
-
-          glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
-          glVertex2d(posX+tmpGlyph->width*this->size, 0);
-
-          glEnd();
-          glEndList();
-          posX += tmpGlyph->advance * this->size;
-        }
-        ++tmpText;
-      }
-    }
-  }
-  else //(if type & TEXT_RENDER_STATIC)
-  {
-    glBindTexture(GL_TEXTURE_2D, this->texture);
-    glBegin(GL_QUADS);
-
-    glTexCoord2f(this->texCoord.minU, this->texCoord.minV);
-    glVertex2f(this->getAbsCoor2D().x,   this->getAbsCoor2D().y  );
-
-    glTexCoord2f(this->texCoord.maxU, this->texCoord.minV);
-    glVertex2f(this->getAbsCoor2D().x + this->width, this->getAbsCoor2D().y  );
-
-    glTexCoord2f(this->texCoord.maxU, this->texCoord.maxV);
-    glVertex2f(this->getAbsCoor2D().x + this->width, getAbsCoor2D().y + this->height);
-
-    glTexCoord2f(this->texCoord.minU, this->texCoord.maxV);
-    glVertex2f(getAbsCoor2D().x, getAbsCoor2D().y + this->height);
-
-    glEnd();
-
-  }
+  }
+
   glPopMatrix();
 }
Index: trunk/src/lib/graphics/text_engine/text.h
===================================================================
--- trunk/src/lib/graphics/text_engine/text.h	(revision 5515)
+++ trunk/src/lib/graphics/text_engine/text.h	(revision 5767)
@@ -26,20 +26,4 @@
 struct SDL_Surface;
 
-/**
- * STATIC means: a font, that is only one GL-face.
- ** it is very fast, and can be used for all text
- ** that does not have to be changed anymore, or if
- ** the the text should look very nice
- * DYNAMIC means: a very fast font, that will is build
- ** from multiple quads.
- ** Use this type, if you want to create fast changing
- ** text like a counter.
- */
-typedef enum TEXT_RENDER_TYPE
-{
-  TEXT_RENDER_STATIC      = 1,
-  TEXT_RENDER_DYNAMIC     = 2
-};
-
 //! A Struct to handel Texture Coordinates for quads
 struct TexCoord
@@ -55,5 +39,5 @@
 {
   public:
-    Text(const char* fontFile = NULL, unsigned int fontSize = TEXT_DEFAULT_SIZE, TEXT_RENDER_TYPE type = TEXT_RENDER_DYNAMIC);
+    Text(const char* fontFile = NULL, unsigned int fontSize = TEXT_DEFAULT_SIZE);
     ~Text();
     void init();
@@ -74,7 +58,4 @@
 //    void getSize(float &x, float& y) const { return this->size; };
 
-    void setType(TEXT_RENDER_TYPE type);
-    void createTexture();
-
     virtual void draw() const;
 
@@ -88,5 +69,4 @@
     Font*             font;           //!< Font of this text
 
-    TEXT_RENDER_TYPE  type;           //!< The type of this Font.
     char*             text;           //!< The text to display
     const char*       externText;     //!< the text to Display from an external Source.
@@ -94,10 +74,4 @@
     float             blending;       //!< The blending intensity.
     float             size;           //!< The size of the Font.
-
-  // placement in openGL
-    GLuint            texture;        //!< A GL-texture to hold the text (static Mode)
-    TexCoord          texCoord;       //!< Texture-coordinates @todo fix this to have a struct
-    float             height;
-    float             width;
 };
 
