Index: branches/network/src/lib/graphics/effects/fog_effect.cc
===================================================================
--- branches/network/src/lib/graphics/effects/fog_effect.cc	(revision 6758)
+++ branches/network/src/lib/graphics/effects/fog_effect.cc	(revision 6768)
@@ -22,8 +22,11 @@
 #include "factory.h"
 
+#include "glincl.h"
+
+
 
 using namespace std;
 
-CREATE_FACTORY(FogEffect, CL_LIGHT);
+CREATE_FACTORY(FogEffect, CL_FOG_EFFECT);
 
 
@@ -35,4 +38,10 @@
  FogEffect::FogEffect(const TiXmlElement* root)
 {
+
+  this->fogMode = GL_EXP2;
+  this->fogDensity = 0.001f;
+  this->fogStart = 10.0f;
+  this->fogEnd = 1000.0f;
+
 
   if (root != NULL)
@@ -55,6 +64,12 @@
   GraphicsEffect::loadParams(root);
 
-//   LoadParam(root, "diffuse-color", this, FogEffect, setDiffuseColor)
-//       .describe("sets the diffuse color of the FogEffect (red [0-1], green [0-1], blue [0-1])");
+   LoadParam(root, "fog-effect", this, FogEffect, setFogMode)
+       .describe("sets the the fog mode {GL_LINEAR, GL_EXP, GL_EXP2}");
+
+   LoadParam(root, "fog-density", this, FogEffect, setFogDensity)
+       .describe("sets the the fog density of the exponentionl functions");
+
+   LoadParam(root, "fog-range", this, FogEffect, setFogRange)
+       .describe("sets the the range of the linear functions");
 }
 
@@ -72,15 +87,21 @@
 bool FogEffect::activate()
 {
-/*  glEnable(GL_FOG);
+  PRINTF(4)( "Enabling Fog Effect, mode: %i, density: %f, start: %f, end: %f\n", this->fogMode, this->fogDensity,
+             this->fogStart, this->fogEnd);
+
+  glEnable(GL_FOG);
   {
-    GLfloat fogColor[4] = {0.5, 0.5, 1.0};
+    GLfloat fogColor[4] = {0.5, 0.5, 0.5, 1.0};
 
-    GLint fogMode = GL_EXP;
-    glFogi(GL_FOG_MODE, fogMode);
+    glFogi(GL_FOG_MODE, this->fogMode);
     glFogfv(GL_FOG_COLOR, fogColor);
-    gfFogf(GL_FOG_DENSITY, 0.35f);
+    glFogf(GL_FOG_DENSITY, this->fogDensity);
+    glHint(GL_FOG_HINT, GL_DONT_CARE);
+    glFogf(GL_FOG_START, this->fogStart);
+    glFogf(GL_FOG_END, this->fogEnd);
 
-
-  }*/
+    //glFogi(GL_FOG_COORDINATE_SOURCE, GL_FOG_COORDINATE);
+  }
+  glClearColor(0.5, 0.5, 0.5, 1.0);
 }
 
@@ -90,3 +111,23 @@
  */
 bool FogEffect::deactivate()
-{}
+{
+  glDisable(GL_FOG);
+}
+
+
+/**
+ * converts a gl mode char to a GLint
+ * @param mode the mode character
+ */
+GLint FogEffect::charToFogMode(const char* mode)
+{
+  if( !strcmp( "GL_LINEAR", mode))
+    return GL_LINEAR;
+  else if( !strcmp("GL_EXP", mode))
+    return GL_EXP;
+  else if(!strcmp("GL_EXP2", mode) )
+    return GL_EXP2;
+  else
+    return -1;
+}
+
Index: branches/network/src/lib/graphics/effects/fog_effect.h
===================================================================
--- branches/network/src/lib/graphics/effects/fog_effect.h	(revision 6758)
+++ branches/network/src/lib/graphics/effects/fog_effect.h	(revision 6768)
@@ -24,4 +24,19 @@
     virtual bool activate();
     virtual bool deactivate();
+
+    void setFogMode(const char* mode) { this->fogMode = this->charToFogMode(mode); }
+    void setFogDensity(float density) { this->fogDensity = density; }
+    void setFogRange(float start, float end) { this->fogStart = start; this->fogEnd = end; }
+
+
+  private:
+    GLint charToFogMode(const char* mode);
+
+
+  private:
+    GLint                   fogMode;
+    GLfloat                 fogDensity;
+    GLfloat                 fogStart;
+    GLfloat                 fogEnd;
 };
 
Index: branches/network/src/lib/graphics/effects/graphics_effect.cc
===================================================================
--- branches/network/src/lib/graphics/effects/graphics_effect.cc	(revision 6758)
+++ branches/network/src/lib/graphics/effects/graphics_effect.cc	(revision 6768)
@@ -13,5 +13,4 @@
 ### File Specific:
    main-programmer: Patrick Boenzli
-   co-programmer: ...
 */
 
@@ -21,4 +20,5 @@
 #include "graphics_effect.h"
 
+#include "graphics_engine.h"
 #include "load_param.h"
 
@@ -35,4 +35,7 @@
 GraphicsEffect::GraphicsEffect(const TiXmlElement* root)
 {
+  this->bActivated = false;
+
+  this->bActivated = GraphicsEngine::getInstance()->loadGraphicsEffect(this);
 
   if (root != NULL)
@@ -45,5 +48,8 @@
  */
 GraphicsEffect::~GraphicsEffect()
-{}
+{
+  if( this->bActivated)
+    GraphicsEngine::getInstance()->unloadGraphicsEffect(this);
+}
 
 
Index: branches/network/src/lib/graphics/effects/graphics_effect.h
===================================================================
--- branches/network/src/lib/graphics/effects/graphics_effect.h	(revision 6758)
+++ branches/network/src/lib/graphics/effects/graphics_effect.h	(revision 6768)
@@ -24,4 +24,10 @@
     virtual bool activate() = 0;
     virtual bool deactivate() = 0;
+
+    inline bool isActivated() { return this->bActivated; }
+
+
+  protected:
+    bool              bActivated;
 };
 
