Index: trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- trunk/src/lib/graphics/graphics_engine.cc	(revision 5416)
+++ trunk/src/lib/graphics/graphics_engine.cc	(revision 5417)
@@ -117,10 +117,10 @@
   // looking if we are in fullscreen-mode
   const char* fullscreen = iniParser->getVar(CONFIG_NAME_FULLSCREEN, CONFIG_SECTION_VIDEO, "0");
-  if (strchr(fullscreen, '1') || strcasecmp(fullscreen, "true"))
+  if (strchr(fullscreen, '1') || !strcasecmp(fullscreen, "true"))
     this->fullscreenFlag = SDL_FULLSCREEN;
 
   // looking if we are in fullscreen-mode
   const char* textures = iniParser->getVar(CONFIG_NAME_TEXTURES, CONFIG_SECTION_VIDEO_ADVANCED, "0");
-  if (strchr(textures, '1') || strcasecmp(textures, "true"))
+  if (strchr(textures, '1') || !strcasecmp(textures, "true"))
     this->texturesEnabled = true;
   else
@@ -544,9 +544,10 @@
 void GraphicsEngine::draw() const
 {
+  LightManager::getInstance()->draw();
   GraphicsEngine::storeMatrices();
   Shader::suspendShader();
+
   Render2D::getInstance()->draw(E2D_LAYER_ALL);
   Shader::restoreShader();
-  LightManager::getInstance()->draw();
 }
 
Index: trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5416)
+++ trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5417)
@@ -902,5 +902,5 @@
   if (this->visible)
     this->draw();
-  if (this->children->getSize() >0)
+  if (this->children->getSize() > 0)
   {
     tIterator<Element2D>* drawIT = children->getIterator();
@@ -919,6 +919,63 @@
  * displays the Element2D at its position with its rotation as a Plane.
  */
-void Element2D::debugDraw2D(unsigned int depth, float size, Vector color) const
-{
+void Element2D::debugDraw2D(unsigned int depth, float size, Vector color, unsigned int level) const
+{
+  if (level == 0)
+  {
+    glPushAttrib(GL_ENABLE_BIT);
+    glMatrixMode(GL_MODELVIEW);
+
+    glDisable(GL_LIGHTING);
+    glDisable(GL_BLEND);
+    glDisable(GL_TEXTURE_2D);
+  }
+
+  glPushMatrix();
+  /* translate */
+  /* rotate */
+  glColor3f(color.x, color.y, color.z);
+
+  glTranslatef (this->getAbsCoor2D().x, this->getAbsCoor2D().y, 0);
+  glRotatef(this->getAbsDir2D(), 0,0,1);
+  glBegin(GL_LINE_LOOP);
+  glVertex2f(-this->getSizeX2D(), -this->getSizeY2D());
+  glVertex2f(-this->getSizeX2D(), +this->getSizeY2D());
+  glVertex2f(+this->getSizeX2D(), +this->getSizeY2D());
+  glVertex2f(+this->getSizeX2D(), -this->getSizeY2D());
+  glEnd();
+
+
+  glPopMatrix();
+  if (depth >= 2 || depth == 0)
+  {
+    Vector childColor =  Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(20,0,.0));
+    tIterator<Element2D>* iterator = this->children->getIterator();
+    Element2D* pn = iterator->firstElement();
+    while( pn != NULL)
+    {
+      // drawing the Dependency graph
+      if (this != NullElement2D::getInstance())
+      {
+        glBegin(GL_LINES);
+        glColor3f(color.x, color.y, color.z);
+        glVertex3f(this->getAbsCoor2D ().x,
+                   this->getAbsCoor2D ().y,
+                   0);
+        glColor3f(childColor.x, childColor.y, childColor.z);
+        glVertex3f(pn->getAbsCoor2D ().x,
+                   pn->getAbsCoor2D ().y,
+                   0);
+        glEnd();
+      }
+      if (depth == 0)
+        pn->debugDraw2D(0, size, childColor, level+1);
+      else
+        pn->debugDraw2D(depth - 1, size, childColor, level +1);
+      pn = iterator->nextElement();
+    }
+    delete iterator;
+  }
+  if (level == 0)
+    glPopAttrib();
 
 }
Index: trunk/src/lib/graphics/render2D/element_2d.h
===================================================================
--- trunk/src/lib/graphics/render2D/element_2d.h	(revision 5416)
+++ trunk/src/lib/graphics/render2D/element_2d.h	(revision 5417)
@@ -185,5 +185,5 @@
 
     void debug (unsigned int depth = 1, unsigned int level = 0) const;
-    void debugDraw2D(unsigned int depth = 1, float size = 1.0, Vector color = Vector(1,1,1)) const;
+    void debugDraw2D(unsigned int depth = 1, float size = 1.0, Vector color = Vector(1,0,0), unsigned int level = 0) const;
 
     // helper functions //
Index: trunk/src/lib/graphics/render2D/render_2d.cc
===================================================================
--- trunk/src/lib/graphics/render2D/render_2d.cc	(revision 5416)
+++ trunk/src/lib/graphics/render2D/render_2d.cc	(revision 5417)
@@ -25,4 +25,7 @@
 #include <math.h>
 
+#include "shell_command.h"
+SHELL_COMMAND(toggleNodeVisibility, Render2D, toggleNodesVisibility);
+
 using namespace std;
 
@@ -34,4 +37,6 @@
    this->setClassID(CL_RENDER_2D, "Render2D");
    this->setName("Render2D");
+
+   this->showNodes = false;
 }
 
@@ -78,4 +83,6 @@
   GraphicsEngine::enter2DMode();
   NullElement2D::getInstance()->draw2D(E2D_LAYER_ALL);
+  if (this->showNodes)
+    NullElement2D::getInstance()->debugDraw2D(0);
   GraphicsEngine::leave2DMode();
 }
Index: trunk/src/lib/graphics/render2D/render_2d.h
===================================================================
--- trunk/src/lib/graphics/render2D/render_2d.h	(revision 5416)
+++ trunk/src/lib/graphics/render2D/render_2d.h	(revision 5417)
@@ -22,4 +22,6 @@
     inline static Render2D* getInstance() { if (!singletonRef) singletonRef = new Render2D();  return singletonRef; };
 
+    void toggleNodesVisibility() { this->showNodes = !this->showNodes; };
+
     void update(float dt);
     void tick(float dt);
@@ -30,4 +32,5 @@
     static Render2D*              singletonRef;                    //!< Reference to this class.
 
+    bool                          showNodes;                       //!< If the debug-Nodes should be visible
  };
 
