Index: trunk/src/lib/graphics/Makefile.am
===================================================================
--- trunk/src/lib/graphics/Makefile.am	(revision 6731)
+++ trunk/src/lib/graphics/Makefile.am	(revision 6753)
@@ -11,5 +11,7 @@
 			   text_engine/text_engine.cc \
 			   text_engine/text.cc \
-			   text_engine/font.cc
+			   text_engine/font.cc \
+			   effects/graphics_effect.cc \
+			   effects/fog_effect.cc
 
 noinst_HEADERS = graphics_engine.h \
@@ -20,5 +22,7 @@
 		 text_engine/text_engine.h \
 		 text_engine/text.h \
-		 text_engine/font.h
+		 text_engine/font.h \
+		 effects/graphics_effect.h \
+		 effects/fog_effect.h
 
 
Index: trunk/src/lib/graphics/effects/fog_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/fog_effect.cc	(revision 6753)
+++ trunk/src/lib/graphics/effects/fog_effect.cc	(revision 6753)
@@ -0,0 +1,92 @@
+
+
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Patrick Boenzli
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
+
+#include "fog_effect.h"
+
+#include "load_param.h"
+#include "factory.h"
+
+
+using namespace std;
+
+CREATE_FACTORY(FogEffect, CL_LIGHT);
+
+
+
+/**
+ *  default constructor
+ * @param root The XML-element to load the FogEffect from
+ */
+ FogEffect::FogEffect(const TiXmlElement* root)
+{
+
+  if (root != NULL)
+    this->loadParams(root);
+}
+
+
+/**
+ *  destroys a FogEffect
+ */
+FogEffect::~FogEffect()
+{}
+
+
+/**
+ * @param root The XML-element to load the FogEffect from
+ */
+void FogEffect::loadParams(const TiXmlElement* root)
+{
+  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])");
+}
+
+
+/**
+ * initializes the fog effect
+ */
+bool FogEffect::init()
+{}
+
+
+/**
+ * activates the fog effect
+ */
+bool FogEffect::activate()
+{
+/*  glEnable(GL_FOG);
+  {
+    GLfloat fogColor[4] = {0.5, 0.5, 1.0};
+
+    GLint fogMode = GL_EXP;
+    glFogi(GL_FOG_MODE, fogMode);
+    glFogfv(GL_FOG_COLOR, fogColor);
+    gfFogf(GL_FOG_DENSITY, 0.35f);
+
+
+  }*/
+}
+
+
+/**
+ * deactivates the fog effect
+ */
+bool FogEffect::deactivate()
+{}
Index: trunk/src/lib/graphics/effects/fog_effect.h
===================================================================
--- trunk/src/lib/graphics/effects/fog_effect.h	(revision 6753)
+++ trunk/src/lib/graphics/effects/fog_effect.h	(revision 6753)
@@ -0,0 +1,29 @@
+/**
+ * @file fog_effect.h
+ *  atmospheric fog
+ */
+
+#ifndef _FOG_EFFECT
+#define _FOG_EFFECT
+
+#include "graphics_effect.h"
+
+class TiXmlElement;
+
+//! A class that handles FogEffects. The FogEffectManager operates on this.
+class FogEffect : public GraphicsEffect
+{
+  public:
+    FogEffect(const TiXmlElement* root = NULL);
+    virtual ~FogEffect();
+
+    virtual void loadParams(const TiXmlElement* root);
+
+    virtual bool init();
+
+    virtual bool activate();
+    virtual bool deactivate();
+};
+
+
+#endif /* _FOG_EFFECT */
Index: trunk/src/lib/graphics/effects/graphics_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/graphics_effect.cc	(revision 6753)
+++ trunk/src/lib/graphics/effects/graphics_effect.cc	(revision 6753)
@@ -0,0 +1,67 @@
+
+
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
+
+
+#include "graphics_effect.h"
+
+#include "load_param.h"
+
+
+using namespace std;
+
+
+
+/**
+ * @param root The XML-element to load the GraphicsEffect from
+
+  @todo what to do, if no GraphicsEffect-Slots are open anymore ???
+ */
+GraphicsEffect::GraphicsEffect(const TiXmlElement* root)
+{
+
+  if (root != NULL)
+    this->loadParams(root);
+}
+
+
+/**
+ *  destroys a GraphicsEffect
+ */
+GraphicsEffect::~GraphicsEffect()
+{}
+
+
+/**
+ * @param root The XML-element to load the GraphicsEffect from
+ */
+void GraphicsEffect::loadParams(const TiXmlElement* root)
+{
+  BaseObject::loadParams(root);
+
+//   LoadParam(root, "diffuse-color", this, GraphicsEffect, setDiffuseColor)
+//       .describe("sets the diffuse color of the GraphicsEffect (red [0-1], green [0-1], blue [0-1])");
+
+}
+
+
+/**
+ *  initializes the graphics effect
+ */
+bool GraphicsEffect::init()
+{}
Index: trunk/src/lib/graphics/effects/graphics_effect.h
===================================================================
--- trunk/src/lib/graphics/effects/graphics_effect.h	(revision 6753)
+++ trunk/src/lib/graphics/effects/graphics_effect.h	(revision 6753)
@@ -0,0 +1,29 @@
+/**
+ * @file graphics_effect.h
+ *  abstract type of graphical effects
+ */
+
+#ifndef _GRAPHICS_EFFECT
+#define _GRAPHICS_EFFECT
+
+#include "base_object.h"
+
+class TiXmlElement;
+
+//! A class that handles GraphicsEffects. The GraphicsEffectManager operates on this.
+class GraphicsEffect : public BaseObject
+{
+  public:
+    GraphicsEffect(const TiXmlElement* root = NULL);
+    virtual ~GraphicsEffect();
+
+    virtual void loadParams(const TiXmlElement* root);
+
+    virtual bool init();
+
+    virtual bool activate() = 0;
+    virtual bool deactivate() = 0;
+};
+
+
+#endif /* _GRAPHICS_EFFECT */
Index: trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- trunk/src/lib/graphics/graphics_engine.cc	(revision 6731)
+++ trunk/src/lib/graphics/graphics_engine.cc	(revision 6753)
@@ -35,4 +35,6 @@
 #include "globals.h"
 #include "texture.h"
+
+#include "effects/graphics_effect.h"
 
 #include "shell_command.h"
@@ -653,4 +655,41 @@
       break;
   }
-
-}
+}
+
+
+/**
+ * loads a GraphicsEffect into the engine
+ * @param effect the GraphicsEffect to add
+ */
+bool GraphicsEngine::loadGraphicsEffect(GraphicsEffect* effect)
+{
+  list<GraphicsEffect*>::iterator it;
+  for (it = this->graphicsEffects.begin(); it != this->graphicsEffects.end(); it++)
+    if( (*it) == effect)
+      return false;
+
+  this->graphicsEffects.push_back(effect);
+
+  return true;
+}
+
+
+/**
+ * unloads a GraphicsEffect from the engine
+ * @param effect the GraphicsEffect to remove
+ */
+bool GraphicsEngine::unloadGraphicsEffect(GraphicsEffect* effect)
+{
+  list<GraphicsEffect*>::iterator it;
+  for (it = this->graphicsEffects.begin(); it != this->graphicsEffects.end(); it++)
+  {
+    if( (*it) == effect)
+    {
+      this->graphicsEffects.erase(it);
+      return true;
+    }
+  }
+
+  return false;
+}
+
Index: trunk/src/lib/graphics/graphics_engine.h
===================================================================
--- trunk/src/lib/graphics/graphics_engine.h	(revision 6731)
+++ trunk/src/lib/graphics/graphics_engine.h	(revision 6753)
@@ -22,4 +22,5 @@
 class SubString;
 class WorldEntity;
+class GraphicsEffect;
 
 //! class to handle graphics
@@ -82,4 +83,9 @@
     void process(const Event  &event);
 
+    bool loadGraphicsEffect(GraphicsEffect* effect);
+    bool unloadGraphicsEffect(GraphicsEffect* effect);
+
+
+
   private:
     GraphicsEngine();
@@ -91,36 +97,39 @@
 
   private:
-    static GraphicsEngine*  singletonRef;       //!< Pointer to the only instance of this Class
-    bool                    isInit;             //!< if the GraphicsEngine is initialized.
+    static GraphicsEngine*     singletonRef;       //!< Pointer to the only instance of this Class
+    bool                       isInit;             //!< if the GraphicsEngine is initialized.
 
     // state.
-    SDL_Surface*            screen;             //!< the screen we draw to
-    int                     resolutionX;        //!< the X-resoultion of the screen
-    int                     resolutionY;        //!< the Y-resolution of the screen
-    int                     bitsPerPixel;       //!< the bits per pixels of the screen
-    Uint32                  fullscreenFlag;     //!< if we are in fullscreen mode
-    Uint32                  videoFlags;         //!< flags for video
-    SDL_Rect**              videoModes;         //!< list of resolutions
+    SDL_Surface*               screen;             //!< the screen we draw to
+    int                        resolutionX;        //!< the X-resoultion of the screen
+    int                        resolutionY;        //!< the Y-resolution of the screen
+    int                        bitsPerPixel;       //!< the bits per pixels of the screen
+    Uint32                     fullscreenFlag;     //!< if we are in fullscreen mode
+    Uint32                     videoFlags;         //!< flags for video
+    SDL_Rect**                 videoModes;         //!< list of resolutions
 
-    bool                    fogEnabled;         //!< If Fog should be enabled.
-    bool                    shadowsEnabled;     //!< If Shadows should be enabled.
-    bool                    particlesEnabled;   //!< If particles should be enabled.
-    int                     particlesValue;     //!< How many particles
-    int                     textureQuality;     //!< the quality of Textures
-    int                     filteringMethod;    //!< The filtering Method of textures.
-    int                     modelQuality;       //!< The quality of the Models loaded.
-    int                     antialiasingDepth;  //!< the Depth of the AntiAlias-Filter.
+    bool                       fogEnabled;         //!< If Fog should be enabled.
+    bool                       shadowsEnabled;     //!< If Shadows should be enabled.
+    bool                       particlesEnabled;   //!< If particles should be enabled.
+    int                        particlesValue;     //!< How many particles
+    int                        textureQuality;     //!< the quality of Textures
+    int                        filteringMethod;    //!< The filtering Method of textures.
+    int                        modelQuality;       //!< The quality of the Models loaded.
+    int                        antialiasingDepth;  //!< the Depth of the AntiAlias-Filter.
 
     // HARDWARE-Settings:
-    char*                   hwRenderer;         //!< HW-renderer-string
-    char*                   hwVendor;           //!< HW-vendor-string
-    char*                   hwVersion;          //!< HW-version-string
-    SubString*              hwExtensions;       //!< All suported Extensions.
+    char*                      hwRenderer;         //!< HW-renderer-string
+    char*                      hwVendor;           //!< HW-vendor-string
+    char*                      hwVersion;          //!< HW-version-string
+    SubString*                 hwExtensions;       //!< All suported Extensions.
 
     // FPS-related
-    bool                    bDisplayFPS;        //!< is true if the fps should be displayed
-    float                   currentFPS;         //!< the current frame rate: frames per seconds
-    float                   maxFPS;             //!< maximal frame rate we ever got since start of the game
-    float                   minFPS;             //!< minimal frame rate we ever got since start.
+    bool                       bDisplayFPS;        //!< is true if the fps should be displayed
+    float                      currentFPS;         //!< the current frame rate: frames per seconds
+    float                      maxFPS;             //!< maximal frame rate we ever got since start of the game
+    float                      minFPS;             //!< minimal frame rate we ever got since start.
+
+    std::list<GraphicsEffect*> graphicsEffects;    //!< list of graphics effects
+
 
 #ifndef NO_TEXT
