Index: orxonox/trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4855)
+++ orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 4856)
@@ -427,5 +427,4 @@
   }
   Render2D::getInstance()->tick(dt);
-
 }
 
@@ -450,11 +449,11 @@
       this->geTextCFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
       this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
-      this->geTextCFPS->setPosition(5, 5);
+      this->geTextCFPS->setPosition2D(5, 5);
       this->geTextMaxFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
       this->geTextMaxFPS->setAlignment(TEXT_ALIGN_LEFT);
-      this->geTextMaxFPS->setPosition(5, 35);
+      this->geTextMaxFPS->setPosition2D(5, 35);
       this->geTextMinFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 35, TEXT_DYNAMIC, 0, 255, 0);
       this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
-      this->geTextMinFPS->setPosition(5, 65);
+      this->geTextMinFPS->setPosition2D(5, 65);
 #endif /* NO_TEXT */
     }
Index: orxonox/trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/render2D/element_2d.cc	(revision 4855)
+++ orxonox/trunk/src/lib/graphics/render2D/element_2d.cc	(revision 4856)
@@ -48,6 +48,8 @@
   this->setClassID(CL_ELEMENT_2D, "Element2D");
 
+  this->setPosition2D(0,0);
+  this->setAlignment(E2D_ALIGN_CENTER);
+
   Render2D::getInstance()->registerElement2D(this);
-
 }
 
@@ -58,6 +60,13 @@
 void Element2D::positioning()
 {
-  // setting the Position of this ELEM2D.
-  if (this->bindNode)
+
+  // setting the Position of this 2D-Element.
+  if (this->alignment == E2D_ALIGN_SCREEN_CENTER)
+  {
+    absPos2D.x = GraphicsEngine::getInstance()->getResolutionX()/2 + this->relPos2D[0];
+    absPos2D.y = GraphicsEngine::getInstance()->getResolutionY()/2 + this->relPos2D[1];
+    absPos2D.depth = 0;
+  }
+  else if (this->bindNode)
   {
     GLdouble projectPos[3];
Index: orxonox/trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- orxonox/trunk/src/lib/graphics/render2D/element_2d.h	(revision 4855)
+++ orxonox/trunk/src/lib/graphics/render2D/element_2d.h	(revision 4856)
@@ -26,9 +26,9 @@
 typedef enum
 {
-  E2D_ALIGN_NONE,
-  E2D_ALIGN_LEFT,
-  E2D_ALIGN_RIGHT,
-  E2D_ALIGN_CENTER,
-  E2D_ALIGN_SCREEN_CENTER
+  E2D_ALIGN_NONE                =     0,
+  E2D_ALIGN_LEFT                =     1,
+  E2D_ALIGN_RIGHT               =     2,
+  E2D_ALIGN_CENTER              =     4,
+  E2D_ALIGN_SCREEN_CENTER       =     8
 } E2D_ALIGNMENT;
 
@@ -39,5 +39,4 @@
   float       y;                 //!< The y-coordinate.
   float       depth;             //!< The distance from the viewing plane.
-
 };
 
@@ -49,10 +48,16 @@
     virtual ~Element2D();
 
-    void setPosition2D(int xCoord, int yCoord);
-    void setLayer(E2DLayer layer);
+    /** @param xCoord the xCoordinate @param yCoord the y-Coordinate. These coordinates are Relative */
+    inline void setPosition2D(int xCoord, int yCoord) { this->relPos2D[0] = xCoord; this->relPos2D[1] = yCoord; };
+    /** this returns the Absolute Position on the screen set by positioning in the tick-phase */
+    inline const Position2D& getPosition2D() { return this->absPos2D; };
+    /** @param alignment the new Alignment of the 2D-Element */
+    inline void setAlignment(E2D_ALIGNMENT alignment) { this->alignment = alignment; };
+    /** @param layer the Layer this is drawn on */
+    inline void setLayer(E2DLayer layer) { this->layer = layer; };
     /** @param visible true if the Element should be visible false otherwise (will not be rendered) */
     inline void setVisibility(bool visible) { this->visible = visible; };
     /** @param bindNode the Node this 2D-element should follow. if NULL the Element will not follow anything */
- // inline void setBindNode(const PNode* bindNode) { this->bindNode = bindNode; };
+    inline void setBindNode(const PNode* bindNode) { this->bindNode = bindNode; };
 
     /** @returns the visibility state */
@@ -68,11 +73,13 @@
   protected:
     const PNode*            bindNode;         //!< a node over which to display this 2D-element
+    int                     relPos2D[2];      //!< X-coord, Y-Coord (relative to the Coordinates of the alignment if given.)
+    Position2D              absPos2D;         //!< The absolute position of the 2D-Element.
+
+    E2D_ALIGNMENT           alignment;        //!< How the Element is aligned around its Position
+
   private:
     bool                    visible;
-    int                     relPos2D[2];      //!< X-coord, Y-Coord (relative to the Coordinates of the alignment if given.)
-    Position2D              absPos2D;         //!< The absolute position of the 2D-Element.
     E2DLayer                layer;
 
-    E2D_ALIGNMENT           alignment;        //!< How the Element is aligned around its Position
 };
 
Index: orxonox/trunk/src/lib/graphics/text_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4855)
+++ orxonox/trunk/src/lib/graphics/text_engine.cc	(revision 4856)
@@ -61,5 +61,4 @@
   this->blending = 1.0f;
   this->setType(type);
-  this->setPosition(0, 0);
 
   this->setText(FONT_DEFAULT_TEXT);
@@ -120,24 +119,4 @@
 
 /**
- *  sets a Position.
- * @param x the x-position in pixels from the left border
- * @param y the y-position in pixels from the top border
-*/
-void Text::setPosition(int x, int y)
-{
-  this->posSize.x = x;
-  this->posSize.y = y;
-}
-
-/**
- *  sets the text-alignment
- * @param alignment the alignment to set
-*/
-void Text::setAlignment(TEXT_ALIGNMENT alignment)
-{
-  this->alignment = alignment;
-}
-
-/**
  *  sets a new color to the font
  * @param r Red
@@ -180,30 +159,14 @@
 void Text::draw() const
 {
-  // setting the Position of this Text.
-  Vector pos;
-  if (this->alignment == TEXT_ALIGN_SCREEN_CENTER)
-    {
-      pos.x = GraphicsEngine::getInstance()->getResolutionX()/2 + this->posSize.x;
-      pos.y = GraphicsEngine::getInstance()->getResolutionY()/2 + this->posSize.y;
-      pos.z = 0;
-    }
-  else if (this->bindNode)
-    {
-      GLdouble x = this->bindNode->getAbsCoor().x;
-      GLdouble y = this->bindNode->getAbsCoor().y;
-      GLdouble z = this->bindNode->getAbsCoor().z;
-      GLdouble tmp[3];
-      gluProject(x, y, z, GraphicsEngine::modMat, GraphicsEngine::projMat, GraphicsEngine::viewPort, tmp, tmp+1, tmp+2);
-      pos.x = tmp[0] + this->posSize.x;
-      pos.y = GraphicsEngine::getInstance()->getResolutionY() - tmp[1] + this->posSize.y;
-      pos.z = tmp[2];
-    }
-  else
-    {
-      pos.x = this->posSize.x;
-      pos.y = this->posSize.y;
-      pos.z = 0;
-    }
-
+  printf("%s: %d %d, %f\n", this->getName(), absPos2D.x, absPos2D.y, absPos2D.depth);
+
+  glPushMatrix();
+  // transform for alignment.
+  if (this->alignment == TEXT_ALIGN_RIGHT)
+    glTranslatef(-this->posSize.w, 0, 0);
+  else if (this->alignment == TEXT_ALIGN_CENTER || this->alignment == TEXT_ALIGN_SCREEN_CENTER)
+    glTranslatef(-this->posSize.w/2, 0, 0);
+
+  // drawing this Text.
   // setting the Blending effects
   glColor4f(1.0f,1.0f,1.0f, this->blending);
@@ -212,29 +175,20 @@
   glBlendFunc(GL_SRC_ALPHA, GL_ONE);
 
-  glPushMatrix();
-  // transform for alignment.
-  if (this->alignment == TEXT_ALIGN_RIGHT)
-    glTranslatef(-this->posSize.w, 0, 0);
-  else   if (this->alignment == TEXT_ALIGN_CENTER || this->alignment == TEXT_ALIGN_SCREEN_CENTER)
-    glTranslatef(-this->posSize.w/2, 0, 0);
-
-  // drawing this Text.
   if(type == TEXT_STATIC)
     {
       glBindTexture(GL_TEXTURE_2D, this->texture);
-      glEnable(GL_TEXTURE_2D);
       glBegin(GL_QUADS);
 
       glTexCoord2f(this->texCoord.minU, this->texCoord.minV);
-      glVertex2f(pos.x,   pos.y  );
+      glVertex2f(this->absPos2D.x,   this->absPos2D.y  );
 
       glTexCoord2f(this->texCoord.maxU, this->texCoord.minV);
-      glVertex2f(pos.x + this->posSize.w, pos.y  );
+      glVertex2f(this->absPos2D.x + this->posSize.w, this->absPos2D.y  );
 
       glTexCoord2f(this->texCoord.maxU, this->texCoord.maxV);
-      glVertex2f(pos.x + this->posSize.w, pos.y + this->posSize.h);
+      glVertex2f(this->absPos2D.x + this->posSize.w, absPos2D.y + this->posSize.h);
 
       glTexCoord2f(this->texCoord.minU, this->texCoord.maxV);
-      glVertex2f(pos.x, pos.y + this->posSize.h);
+      glVertex2f(absPos2D.x, absPos2D.y + this->posSize.h);
 
       glEnd();
@@ -245,5 +199,5 @@
       glBindTexture(GL_TEXTURE_2D, this->font->getFastTextureID());
       //      glEnable(GL_TEXTURE_2D);
-      glTranslatef(pos.x, pos.y, 0);
+      glTranslatef(absPos2D.x, absPos2D.y, 0);
 
       const char* tmpText = this->text;
@@ -906,28 +860,4 @@
 
 /**
- *  draws all the Texts that have been initialized
-*/
-void TextEngine::draw() const
-{
-  // entering 3D-mode
-  GraphicsEngine::enter2DMode();
-  glEnable(GL_TEXTURE_2D);
-  glEnable(GL_BLEND);
-  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
-  // drawing all the texts
-  tIterator<Text>* textIterator = textList->getIterator();
-  Text* drawText = textIterator->nextElement();
-  while( drawText != NULL)
-    {
-      drawText->draw();
-      drawText = textIterator->nextElement();
-    }
-  delete textIterator;
-  // retruning to the previous mode
-  GraphicsEngine::leave2DMode();
-}
-
-/**
  *  outputs some nice Debug information
 
Index: orxonox/trunk/src/lib/graphics/text_engine.h
===================================================================
--- orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4855)
+++ orxonox/trunk/src/lib/graphics/text_engine.h	(revision 4856)
@@ -36,12 +36,8 @@
 template<class T> class tList;
 
-//! An enumerator for the text alignment.
- enum TEXT_ALIGNMENT
-{
-  TEXT_ALIGN_LEFT,
-  TEXT_ALIGN_RIGHT,
-  TEXT_ALIGN_CENTER,
-  TEXT_ALIGN_SCREEN_CENTER
-};
+#define  TEXT_ALIGN_LEFT             E2D_ALIGN_LEFT
+#define  TEXT_ALIGN_RIGHT            E2D_ALIGN_RIGHT
+#define  TEXT_ALIGN_CENTER           E2D_ALIGN_CENTER
+#define  TEXT_ALIGN_SCREEN_CENTER    E2D_ALIGN_SCREEN_CENTER
 
 /* some default values */
@@ -114,8 +110,6 @@
   void setType(int type);
   void setText(const char* text);
-  void setPosition(int x, int y);
-  void setAlignment(TEXT_ALIGNMENT alignment);
   /** @param blending the blending intensity to set (between 0.0 and 1.0) */
-  inline void setBlending(float blending) {this->blending = blending;}
+  inline void setBlending(float blending) { this->blending = blending; };
 
   // Static Text
@@ -140,5 +134,4 @@
   char*             text;           //!< The text to display
   SDL_Color         color;          //!< The color of the font.
-  TEXT_ALIGNMENT    alignment;      //!< The aignment of the text.
   float             blending;       //!< The blending intensity.
 
@@ -228,6 +221,4 @@
   void flush();
 
-  void draw() const;
-
   void debug() const;
 
@@ -243,5 +234,5 @@
  private:
   //  tList<Font>* fontList;
-  tList<Text>*       textList;      //!< a list of all texts of the textEngine
+  tList<Text>*       textList;      //!< a list of all texts registered to the textEngine @todo this is overhead, do we need this??
 
 };
Index: orxonox/trunk/src/util/track/track_manager.cc
===================================================================
--- orxonox/trunk/src/util/track/track_manager.cc	(revision 4855)
+++ orxonox/trunk/src/util/track/track_manager.cc	(revision 4856)
@@ -381,5 +381,5 @@
   // initializing the Text
   this->trackText = TextEngine::getInstance()->createText("fonts/earth.ttf", 30, TEXT_DYNAMIC, 0, 255, 0);
-  this->trackText->setAlignment(TEXT_ALIGN_SCREEN_CENTER);
+  this->trackText->setAlignment(E2D_ALIGN_SCREEN_CENTER);
   // initializing the Animation for the Text.
   this->textAnimation = new tAnimation<Text>(this->trackText, &Text::setBlending);
