Index: trunk/src/lib/graphics/effects/lense_flare.cc
===================================================================
--- trunk/src/lib/graphics/effects/lense_flare.cc	(revision 7839)
+++ trunk/src/lib/graphics/effects/lense_flare.cc	(revision 7840)
@@ -156,4 +156,6 @@
 
   ImagePlane* bb = new ImagePlane(NULL);
+  if (this->flares.empty())
+    bb->setLayer(E2D_LAYER_BELOW_ALL);
   bb->setTexture(textureName);
   bb->setSize(50, 50);
Index: trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- trunk/src/lib/graphics/graphics_engine.cc	(revision 7839)
+++ trunk/src/lib/graphics/graphics_engine.cc	(revision 7840)
@@ -569,4 +569,8 @@
 }
 
+void GraphicsEngine::drawBackgroundElements() const
+{
+  Render2D::getInstance()->draw(E2D_LAYER_BELOW_ALL, E2D_LAYER_BELOW_ALL);
+}
 
 void GraphicsEngine::draw() const
@@ -583,6 +587,5 @@
   GraphicsEngine::storeMatrices();
   Shader::suspendShader();
-
-  Render2D::getInstance()->draw(E2D_LAYER_ALL);
+  Render2D::getInstance()->draw(E2D_LAYER_BOTTOM, E2D_LAYER_ABOVE_ALL);
   Shader::restoreShader();
 }
Index: trunk/src/lib/graphics/graphics_engine.h
===================================================================
--- trunk/src/lib/graphics/graphics_engine.h	(revision 7839)
+++ trunk/src/lib/graphics/graphics_engine.h	(revision 7840)
@@ -68,4 +68,6 @@
     void update(float dt);
     void tick(float dt);
+
+    void drawBackgroundElements() const;
     void draw() const;
     void displayFPS(bool display);
Index: trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.cc	(revision 7839)
+++ trunk/src/lib/graphics/render2D/element_2d.cc	(revision 7840)
@@ -32,5 +32,4 @@
 SHELL_COMMAND(debug, Element2D, debug2DSC);
 
-using namespace std;
 
 /**
@@ -199,5 +198,5 @@
 
 /**
- * moves a Element to another layer
+ * @brief moves a Element to another layer
  * @param layer the Layer this is drawn on
  */
@@ -254,5 +253,5 @@
 
 /**
- * sets the relative coordinate of the Element2D to its parent
+ * @brief sets the relative coordinate of the Element2D to its parent
  * @param relCoord the relative coordinate to the parent
  */
@@ -269,5 +268,5 @@
 
 /**
- * sets the relative coordinate of the Element2D to its Parent
+ * @brief sets the relative coordinate of the Element2D to its Parent
  * @param x the x coordinate
  * @param y the y coordinate
@@ -279,5 +278,5 @@
 
 /**
- * sets the Relative coordinate to the parent in Pixels
+ * @brief sets the Relative coordinate to the parent in Pixels
  * @param x the relCoord X
  * @param y the relCoord Y
@@ -290,5 +289,5 @@
 
 /**
- * sets a new relative position smoothely
+ * @brief sets a new relative position smoothely
  * @param relCoordSoft the new Position to iterate to
  * @param bias how fast to iterate to this position
@@ -304,5 +303,5 @@
 
 /**
- * sets a new relative position smoothely
+ * @brief sets a new relative position smoothely
  * @param x the new x-coordinate in Pixels of the Position to iterate to
  * @param y the new y-coordinate in Pixels of the Position to iterate to
@@ -317,5 +316,5 @@
 
 /**
- * set relative coordinates smoothely
+ * @brief set relative coordinates smoothely
  * @param x x-relative coordinates to its parent
  * @param y y-relative coordinates to its parent
@@ -420,5 +419,5 @@
 
 /**
- *  shift coordinate ralative
+ * @brief shift coordinate ralative
  * @param shift shift vector
  *
@@ -433,5 +432,5 @@
 
 /**
- * shifts in PixelSpace
+ * @brief shifts in PixelSpace
  * @param x the pixels to shift in X
  * @param y the pixels to shift in Y
@@ -444,5 +443,5 @@
 
 /**
- *  set relative direction
+ * @brief set relative direction
  * @param relDir to its parent
  */
@@ -460,5 +459,5 @@
 
 /**
- * sets the Relative Direction of this node to its parent in a Smoothed way
+ * @brief sets the Relative Direction of this node to its parent in a Smoothed way
  * @param relDirSoft the direction to iterate to smoothely.
  * @param bias how fast to iterate to the new Direction
@@ -474,5 +473,5 @@
 
 /**
- *  sets the absolute direction
+ * @brief sets the absolute direction
  * @param absDir absolute coordinates
  */
@@ -494,5 +493,5 @@
 
 /**
- *  sets the absolute direction softly
+ * @brief sets the absolute direction softly
  * @param absDir absolute coordinates
  */
@@ -553,5 +552,5 @@
       {
         // Inserting the Element at the right Layer depth.
-        list<Element2D*>::iterator elem;
+        std::list<Element2D*>::iterator elem;
         for (elem = this->children.begin(); elem != this->children.end(); elem++)
         {
@@ -628,5 +627,5 @@
 
 /**
- * remove this Element from the tree and adds all children to NullElement2D
+ * @brief remove this Element from the tree and adds all children to NullElement2D
  *
  * afterwards this Node is free, and can be reattached, or deleted freely.
@@ -634,6 +633,6 @@
 void Element2D::remove2D()
 {
-  list<Element2D*>::iterator child = this->children.begin();
-  list<Element2D*>::iterator reparenter;
+  std::list<Element2D*>::iterator child = this->children.begin();
+  std::list<Element2D*>::iterator reparenter;
   while (child != this->children.end())
   {
@@ -671,5 +670,5 @@
 
 /**
- * does the reparenting in a very smooth way
+ * @brief does the reparenting in a very smooth way
  * @param parentNode the new Node to connect this node to.
  * @param bias the speed to iterate to this new Positions
@@ -928,5 +927,5 @@
   if(!this->children.empty() || this->parentMode & E2D_UPDATE_CHILDREN_IF_INACTIVE)
   {
-    list<Element2D*>::iterator child;
+    std::list<Element2D*>::iterator child;
     for (child = this->children.begin(); child != this->children.end(); child++)
     {
@@ -949,5 +948,5 @@
 
 /**
- *  displays some information about this pNode
+ * @brief displays some information about this pNode
  * @param depth The deph into which to debug the children of this Element2D to.
  * (0: all children will be debugged, 1: only this Element2D, 2: this and direct children...)
@@ -975,5 +974,5 @@
   if (depth >= 2 || depth == 0)
   {
-    list<Element2D*>::const_iterator child;
+    std::list<Element2D*>::const_iterator child;
     for (child = this->children.begin(); child != this->children.end(); child++)
     {
@@ -987,5 +986,5 @@
 
 /**
- * ticks the 2d-Element
+ * @brief ticks the 2d-Element
  * @param dt the time elapsed since the last tick
  *
@@ -1000,5 +999,5 @@
   if (this->children.size() > 0)
   {
-    list<Element2D*>::iterator child;
+    std::list<Element2D*>::iterator child;
     for (child = this->children.begin(); child != this->children.end(); child++)
       (*child)->tick2D(dt);
@@ -1007,8 +1006,8 @@
 
 /**
- * draws all the Elements from this element2D downwards
+ * @brief draws all the Elements from this element2D downwards
  * @param layer the maximal Layer to draw. @see E2D_LAYER
  */
-void Element2D::draw2D(short layer) const
+void Element2D::draw2D(E2D_LAYER from, E2D_LAYER to) const
 {
   if (this->bVisible)
@@ -1016,8 +1015,8 @@
   if (this->children.size() > 0)
   {
-    list<Element2D*>::const_iterator child;
+    std::list<Element2D*>::const_iterator child;
     for (child = this->children.begin(); child != this->children.end(); child++)
-      if (likely(layer >= this->layer))
-        (*child)->draw2D(layer);
+      if (likely( (*child)->layer >= from && (*child)->layer <= to))
+        (*child)->draw2D(from, to);
   }
 }
@@ -1057,5 +1056,5 @@
   {
     Vector childColor =  Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(20,0,.0));
-    list<Element2D*>::const_iterator child;
+    std::list<Element2D*>::const_iterator child;
     for (child = this->children.begin(); child != this->children.end(); child++)
     {
Index: trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.h	(revision 7839)
+++ trunk/src/lib/graphics/render2D/element_2d.h	(revision 7840)
@@ -136,5 +136,5 @@
     virtual void draw() const  {};
     void tick2D(float dt);
-    void draw2D(short layer) const;
+    void draw2D(E2D_LAYER from, E2D_LAYER to) const;
 
     // LIKE PNODE
Index: trunk/src/lib/graphics/render2D/render_2d.cc
===================================================================
--- trunk/src/lib/graphics/render2D/render_2d.cc	(revision 7839)
+++ trunk/src/lib/graphics/render2D/render_2d.cc	(revision 7840)
@@ -25,5 +25,5 @@
 
 /**
- * standard constructor
+ * @brief standard constructor
  */
 Render2D::Render2D ()
@@ -36,10 +36,10 @@
 
 /**
- *  the singleton reference to this class
+ * @brief the singleton reference to this class
  */
 Render2D* Render2D::singletonRef = NULL;
 
 /**
- * standard deconstructor
+ * @brief standard deconstructor
  */
 Render2D::~Render2D ()
@@ -51,5 +51,5 @@
 
 /**
- * updates all the 2d-elements
+ * @brief updates all the 2d-elements
  * @param dt the timestep since last dt
  */
@@ -61,5 +61,5 @@
 
 /**
- * ticks all the 2d-elements
+ * @brief ticks all the 2d-elements
  * @param dt the timestep since last dt
  */
@@ -70,13 +70,15 @@
 
 /**
- * renders all the Elements of the Render2D-engine's layer
+ * @brief renders all the Elements of the Render2D-engine's layer
  * @param layer the Layer to draw (if E2D_LAYER_ALL then all layers will be drawn)
  */
-void Render2D::draw(short layer) const
+void Render2D::draw(E2D_LAYER from, E2D_LAYER to) const
 {
   GraphicsEngine::enter2DMode();
-  Element2D::getNullElement()->draw2D(E2D_LAYER_ALL);
+
+  Element2D::getNullElement()->draw2D(from, to);
   if (this->showNodes)
     Element2D::getNullElement()->debugDraw2D(0);
+
   GraphicsEngine::leave2DMode();
 }
Index: trunk/src/lib/graphics/render2D/render_2d.h
===================================================================
--- trunk/src/lib/graphics/render2D/render_2d.h	(revision 7839)
+++ trunk/src/lib/graphics/render2D/render_2d.h	(revision 7840)
@@ -24,5 +24,5 @@
     void update(float dt);
     void tick(float dt);
-    void draw(short layer) const;
+    void draw(E2D_LAYER from, E2D_LAYER to) const;
 
   private:
Index: trunk/src/lib/gui/gl_gui/glgui_handler.cc
===================================================================
--- trunk/src/lib/gui/gl_gui/glgui_handler.cc	(revision 7839)
+++ trunk/src/lib/gui/gl_gui/glgui_handler.cc	(revision 7840)
@@ -68,5 +68,5 @@
   void GLGuiHandler::draw()
   {
-    GLGuiMainWidget::getInstance()->draw2D(E2D_LAYER_TOP);
+//    GLGuiMainWidget::getInstance()->draw2D(E2D_LAYER_TOP);
   }
 
