Index: /trunk/src/lib/graphics/text_engine/font.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/font.cc	(revision 5366)
+++ /trunk/src/lib/graphics/text_engine/font.cc	(revision 5367)
@@ -106,6 +106,4 @@
       if (this->glyphArray[i] != NULL)
       {
-        if (this->glyphArray[i]->displayList != 0)
-          glDeleteLists(this->glyphArray[i]->displayList, 1);
         delete this->glyphArray[i];
       }
@@ -204,33 +202,20 @@
   {
     float cx,cy;
-    Glyph* glyph;
+    Glyph* tmpGlyph;
     this->glyphArray = new Glyph*[FONT_HIGHEST_KNOWN_CHAR];
     for (int i = 0; i < FONT_HIGHEST_KNOWN_CHAR; i++)
     {
-      glyph = this->glyphArray[i] = new Glyph;
-      glyph->displayList = glGenLists(1);
-      if (!glIsList(glyph->displayList))
-      {
-        PRINTF(2)("Error creating glList for Font character %c\n", i);
-        this->glyphArray[i] = NULL;
-        delete glyph;
-        continue;
-      }
+      tmpGlyph = this->glyphArray[i] = new Glyph;
       cx=(float)(i%16)/16.0f;                  // X Position Of Current Character
       cy=(float)(i/16)/16.0f;                  // Y Position Of Current Character
-      glNewList(glyph->displayList, GL_COMPILE); // Start Building A List
-      glBegin(GL_QUADS);                           // Use A Quad For Each Character
-      glTexCoord2f(cx, cy+0.001f);            // Texture Coord (Bottom Left)
-      glVertex2d(0,-16);                            // Vertex Coord (Bottom Left)
-      glTexCoord2f(cx+0.0625f, cy+0.001f);    // Texture Coord (Bottom Right)
-      glVertex2i(16,-16);                           // Vertex Coord (Bottom Right)
-      glTexCoord2f(cx+0.0625f, cy+0.0625f);     // Texture Coord (Top Right)
-      glVertex2i(16,0);                            // Vertex Coord (Top Right)
-      glTexCoord2f(cx, cy+0.0625f);             // Texture Coord (Top Left)
-      glVertex2i(0,0);                             // Vertex Coord (Top Left)
-      glEnd();                                     // Done Building Our Quad (Character)
-//       glTranslated(12,0,0);                        // Move To The Right Of The Character
-      glEndList();                                 // Done Building The Display List
-      this->glyphArray[i]->width = 12;
+
+      tmpGlyph->texCoord[0] = cx;
+      tmpGlyph->texCoord[1] = cx+0.0625f;
+      tmpGlyph->texCoord[2] = cy+0.001f;
+      tmpGlyph->texCoord[3] = cy+0.0625f;
+      tmpGlyph->width = 16;
+      tmpGlyph->bearingX = 16;
+      tmpGlyph->bearingY = 16;
+      tmpGlyph->height = 16;
     }
   }
@@ -292,5 +277,5 @@
                                                0xFF000000
 #else
-                                                   0xFF000000,
+                                               0xFF000000,
                                                0x00FF0000,
                                                0x0000FF00,
@@ -322,15 +307,4 @@
         SDL_BlitSurface(glyphSurf, NULL, tmpSurf, &tmpRect);
         SDL_FreeSurface(glyphSurf);
-              // Outputting Glyphs to BMP-files.
-/*
-        char outname[512];
-        if (i < 10)
-        sprintf( outname, "%s-glyph-00%d.bmp", this->getName(), i );
-        else if (i <100)
-        sprintf( outname, "%s-glyph-0%d.bmp", this->getName(), i );
-        else
-        sprintf( outname, "%s-glyph-%d.bmp", this->getName(), i );
-        SDL_SaveBMP(tmpSurf, outname);*/
-
       }
     }
@@ -409,5 +383,4 @@
 {
   Glyph* rg = new Glyph;
-  rg->displayList = 0;
   rg->character = character;
   if (likely (this->font!= NULL))
@@ -485,5 +458,5 @@
       if (tmpRect.y + maxLineHeight > tmpSurf->h)
       {
-        PRINTF(1)("Protection, so font cannot write over the boundraries error (this should not heappen\n");
+        PRINTF(1)("Protection, so font cannot write over the boundraries (!!this should not heappen!!)\n");
         break;
       }
@@ -499,23 +472,8 @@
 
         SDL_BlitSurface(glyphSurf, NULL, tmpSurf, &tmpRect);
-        TexCoord tmpTexCoord;
-        tmpTexCoord.minU = (float)tmpRect.x/(float)tmpSurf->w;
-        tmpTexCoord.maxU = (float)(tmpRect.x + tmpGlyph->advance)/(float)tmpSurf->w;
-        tmpTexCoord.minV = (float)(tmpRect.y)/(float)tmpSurf->w;
-        tmpTexCoord.maxV = (float)(tmpRect.y+tmpGlyph->height)/(float)tmpSurf->w;
-        tmpGlyph->displayList = glGenLists(1);
-
-        glNewList(tmpGlyph->displayList, GL_COMPILE);
-        glBegin(GL_QUADS);
-        glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.minV);
-        glVertex2d(0, - tmpGlyph->bearingY);
-        glTexCoord2f(tmpTexCoord.minU, tmpTexCoord.maxV);
-        glVertex2d(0, tmpGlyph->height - tmpGlyph->bearingY);
-        glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.maxV);
-        glVertex2d(tmpGlyph->width, tmpGlyph->height - tmpGlyph->bearingY);
-        glTexCoord2f(tmpTexCoord.maxU, tmpTexCoord.minV);
-        glVertex2d(tmpGlyph->width, - tmpGlyph->bearingY);
-        glEnd();
-        glEndList();
+        tmpGlyph->texCoord[0] = (float)tmpRect.x/(float)tmpSurf->w;
+        tmpGlyph->texCoord[1] = (float)(tmpRect.x + tmpGlyph->advance)/(float)tmpSurf->w;
+        tmpGlyph->texCoord[2] = (float)(tmpRect.y)/(float)tmpSurf->w;
+        tmpGlyph->texCoord[3] = (float)(tmpRect.y+tmpGlyph->height)/(float)tmpSurf->w;
         SDL_FreeSurface(glyphSurf);
 
Index: /trunk/src/lib/graphics/text_engine/font.h
===================================================================
--- /trunk/src/lib/graphics/text_engine/font.h	(revision 5366)
+++ /trunk/src/lib/graphics/text_engine/font.h	(revision 5367)
@@ -47,7 +47,5 @@
   int      advance;           //!< How big a Glyph would be in monospace-mode
 
-  // OpenGL-specific
-  //  TexCoord texCoord;      //!< A Texture Coordinate for this glyph.
-  GLuint   displayList;       //!< DiplayList to render this Glyph.
+  GLfloat texCoord[4];        //!< Texture coordinates: 0:left, 1:right, 2: top, 3: bottom.
 };
 
Index: /trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/text.cc	(revision 5366)
+++ /trunk/src/lib/graphics/text_engine/text.cc	(revision 5367)
@@ -70,4 +70,5 @@
   this->blending = TEXT_DEFAULT_BLENDING;
   this->color = TEXT_DEFAULT_COLOR;
+  this->size = TEXT_DEFAULT_SIZE;
   this->setType(TEXT_RENDER_DYNAMIC);
 
@@ -240,9 +241,20 @@
     if (likely(tmpText != NULL))
     {
+      Glyph* tmpGlyph;
       while (likely(*tmpText != '\0'))
       {
-        if(likely(glyphArray[*tmpText] != NULL))
+        if(likely((tmpGlyph = glyphArray[*tmpText]) != NULL))
         {
-          glCallList(glyphArray[*tmpText]->displayList);
+          glBegin(GL_QUADS);
+          glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]);
+          glVertex2d(0, - tmpGlyph->bearingY);
+          glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]);
+          glVertex2d(0, tmpGlyph->height - tmpGlyph->bearingY);
+          glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]);
+          glVertex2d(tmpGlyph->width, tmpGlyph->height - tmpGlyph->bearingY);
+          glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
+          glVertex2d(tmpGlyph->width, - tmpGlyph->bearingY);
+          glEnd();
+          glEndList();
           glTranslatef(glyphArray[*tmpText]->width, 0, 0);
         }
Index: /trunk/src/lib/graphics/text_engine/text.h
===================================================================
--- /trunk/src/lib/graphics/text_engine/text.h	(revision 5366)
+++ /trunk/src/lib/graphics/text_engine/text.h	(revision 5367)
@@ -60,6 +60,6 @@
     void setFont(const char* fontFile, unsigned int fontSize);
 
-    void setType(TEXT_RENDER_TYPE type);
     void setText(const char* text, bool isExtern = false);
+
     /** @returns the String this Text displays */
     inline const char* getText() const { return (externText == NULL)?this->text:this->externText; };
@@ -68,5 +68,8 @@
     /** sets the Color of the Text to render (values in [0-1]) @param r red @param g green @param b blue */
     void setColor(float r, float g, float b) { this->color = Vector(r,g,b); };
+    /** sets the Size of the Font */
+    void setSize(float size) { this->size = size; };
 
+    void setType(TEXT_RENDER_TYPE type);
     void createTexture();
 
@@ -87,4 +90,5 @@
     Vector            color;          //!< The color of the font.
     float             blending;       //!< The blending intensity.
+    float             size;           //!< The size of the Font.
 
   // placement in openGL
