Index: /orxonox/branches/textEngine/src/lib/graphics/font/glfont.cc
===================================================================
--- /orxonox/branches/textEngine/src/lib/graphics/font/glfont.cc	(revision 3699)
+++ /orxonox/branches/textEngine/src/lib/graphics/font/glfont.cc	(revision 3700)
@@ -128,4 +128,6 @@
 
   this->setFont(fontFile);
+
+  this->setColor(0, 255, 0);
 
   this->setText(FONT_DEFAULT_TEXT);
@@ -239,8 +241,8 @@
   glEnable(GL_TEXTURE_2D);
   glBegin(GL_QUADS);
-  glTexCoord2f(0, 0); glVertex2i(20,   20  );
-  glTexCoord2f(1, 0); glVertex2i(20+this->textPosSize.w, 20  );
-  glTexCoord2f(1, 1); glVertex2i(20+this->textPosSize.w, 20+this->textPosSize.h);
-  glTexCoord2f(0, 1); glVertex2i(20, 20+this->textPosSize.h);
+  glTexCoord2f(this->texCoord.minU, this->texCoord.minV); glVertex2i(20,   20  );
+  glTexCoord2f(this->texCoord.maxU, this->texCoord.minV); glVertex2i(20+this->textPosSize.w, 20  );
+  glTexCoord2f(this->texCoord.maxU, this->texCoord.maxV); glVertex2i(20+this->textPosSize.w, 20+this->textPosSize.h);
+  glTexCoord2f(this->texCoord.minU, this->texCoord.maxV); glVertex2i(20, 20+this->textPosSize.h);
   glEnd();
   this->leave2DMode();
@@ -254,5 +256,4 @@
 void GLFont::createTexture(void)
 {
-  GLfloat texcoord[4];
   SDL_Surface* tmpSurf;
   if (this->texture)
@@ -260,5 +261,5 @@
   tmpSurf = TTF_RenderText_Blended(this->font, this->text, this->color);
   if (tmpSurf)
-    this->texture = loadTexture(tmpSurf, texcoord);
+    this->texture = loadTexture(tmpSurf, &texCoord);
 
   this->textPosSize.w = tmpSurf->w;
@@ -343,6 +344,7 @@
   glDisable(GL_DEPTH_TEST);
   glDisable(GL_CULL_FACE);
+  glDisable(GL_LIGHTING);  // will be set back when leaving 2D-mode
   glEnable(GL_TEXTURE_2D);
-  
+
   /* This allows alpha blending of 2D textures with the scene */
   glEnable(GL_BLEND);
@@ -381,8 +383,8 @@
    \brief Loads a Font from an SDL_surface into a texture.
    \param surface The surface to make the texture of
-   \param texcoord The texture coordinates of the 4 corners of the texture
+   \param texCoord The texture coordinates of the 4 corners of the texture
    \returns the ID of the texture
 */
-GLuint GLFont::loadTexture(SDL_Surface *surface, GLfloat *texcoord)
+GLuint GLFont::loadTexture(SDL_Surface *surface, TexCoord* texCoord)
 {
   GLuint texture;
@@ -396,8 +398,8 @@
   w = powerOfTwo(surface->w);
   h = powerOfTwo(surface->h);
-  texcoord[0] = 0.0f;			/* Min X */
-  texcoord[1] = 0.0f;			/* Min Y */
-  texcoord[2] = (GLfloat)surface->w / w;	/* Max X */
-  texcoord[3] = (GLfloat)surface->h / h;	/* Max Y */
+  texCoord->minU = 0.0f;
+  texCoord->minV = 0.0f;
+  texCoord->maxU = (GLfloat)surface->w / w;
+  texCoord->maxV = (GLfloat)surface->h / h;
   
   image = SDL_CreateRGBSurface(
Index: /orxonox/branches/textEngine/src/lib/graphics/font/glfont.h
===================================================================
--- /orxonox/branches/textEngine/src/lib/graphics/font/glfont.h	(revision 3699)
+++ /orxonox/branches/textEngine/src/lib/graphics/font/glfont.h	(revision 3700)
@@ -17,5 +17,5 @@
 #define FONT_DEFAULT_COLOR_G    256                  //!< the default red green (color) of the text
 #define FONT_DEFAULT_COLOR_B    256                  //!< the default red blue (color) of the text
-#define FONT_NUM_COLORS         256                  //!< The number of colors. 
+#define FONT_NUM_COLORS         256                  //!< The number of colors.
 
 
@@ -37,4 +37,13 @@
   int bearingY;                  //!< How much is above the Origin
   int advance;                   //!< How big a Glyph would be in monospace-mode
+};
+
+//! A Struct to handel Texture Coordinates for quads
+struct TexCoord
+{
+  float minU;                      //!< The minimum U-Coordinate
+  float maxU;                      //!< The maximum U-Coordinate
+  float minV;                      //!< The minimum V-Coordinate
+  float maxV;                      //!< The maximum V-Coordinate
 };
 
@@ -73,5 +82,5 @@
   SDL_Rect textPosSize;            //!< An SDL-Rectangle representing the position and size of the Text on the screen.
   int renderStyle;                 //!< The Renderstyle
-  GLfloat* texcoord;               //!< Texture-coordinates \todo fix this to have a struct
+  TexCoord texCoord;               //!< Texture-coordinates \todo fix this to have a struct
 
   bool init(const char* fontFile, unsigned int fontSize = FONT_DEFAULT_SIZE);
@@ -88,5 +97,5 @@
   static bool checkVersion(void);
 
-  GLuint loadTexture(SDL_Surface* surface, GLfloat* texcoord);
+  GLuint loadTexture(SDL_Surface* surface, TexCoord* texCoord);
 
   static int powerOfTwo(int input);
