Index: branches/water/src/lib/event/event_handler.cc
===================================================================
--- branches/water/src/lib/event/event_handler.cc	(revision 8466)
+++ branches/water/src/lib/event/event_handler.cc	(revision 8467)
@@ -355,5 +355,5 @@
   else
   {
-//    SDL_WM_GrabInput(SDL_GRAB_ON);
+    SDL_WM_GrabInput(SDL_GRAB_ON);
     SDL_ShowCursor(SDL_DISABLE);
   }
Index: branches/water/src/world_entities/environments/mapped_water.cc
===================================================================
--- branches/water/src/world_entities/environments/mapped_water.cc	(revision 8466)
+++ branches/water/src/world_entities/environments/mapped_water.cc	(revision 8467)
@@ -20,5 +20,5 @@
 #include "state.h"
 
-
+//#include "fog_effect.h"
 
 
@@ -138,6 +138,6 @@
 MappedWater::~MappedWater()
 {
-  //delete shader;
-  //delete cam_uni;
+  delete shader;
+  delete cam_uni;
 }
 
@@ -146,5 +146,5 @@
   WorldEntity::loadParams(root);
 
-  LoadParam(root, "waterHeight", this, MappedWater, setHeight);
+  LoadParam(root, "waterPos", this, MappedWater, setWaterPos);
   LoadParam(root, "lightPos", this, MappedWater, setLightPosition);
 }
@@ -156,5 +156,5 @@
 
   glPushMatrix();
-  glTranslatef(0,this->waterHeight,0);
+  glTranslatef(this->waterPos.x,this->waterPos.y,this->waterPos.z);
 
   mat.unselect();
@@ -178,5 +178,5 @@
   glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                       // DUDV map texture
   //glMultiTexCoord2f(GL_TEXTURE4, 0, 0);                       // Depth texture
-  glVertex3f(0.0f, waterHeight, 0.0f);
+  glVertex3f(0.0f, waterPos.y, 0.0f);
 
   // The front left vertice for the water
@@ -188,5 +188,5 @@
   glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
   //glMultiTexCoord2f(GL_TEXTURE4, 0, 0);                        // Depth texture
-  glVertex3f(0.0f, waterHeight, 1000.0f);
+  glVertex3f(0.0f, waterPos.y, 1000.0f);
 
   // The front right vertice for the water
@@ -198,5 +198,5 @@
   glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
   //glMultiTexCoord2f(GL_TEXTURE4, 0, 0);                        // Depth texture
-  glVertex3f(1000.0f, waterHeight, 1000.0f);
+  glVertex3f(1000.0f, waterPos.y, 1000.0f);
 
   // The back right vertice for the water
@@ -208,5 +208,5 @@
   glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                        // DUDV map texture
   //glMultiTexCoord2f(GL_TEXTURE4, 0, 0);                        // Depth texture
-  glVertex3f(1000.0f, waterHeight, 0.0f);
+  glVertex3f(1000.0f, waterPos.y, 0.0f);
   glEnd();
 
@@ -214,4 +214,10 @@
 
   mat.unselect();
+
+  if(this->waterPos.y)
+  {
+    // draw some fog
+    //FogEffect::activate();
+  }
 
   glPopMatrix();
@@ -227,11 +233,65 @@
 }
 
-void MappedWater::setHeight(float height)
-{
-  this->waterHeight = height;
-}
-
 void MappedWater::activateReflection()
 {
+  // save viewport matrix and change the viewport size
+  glPushAttrib(GL_VIEWPORT_BIT);
+  glViewport(0,0, textureSize, textureSize);
+
+  glMatrixMode(GL_MODELVIEW);
+  glPushMatrix();
+
+  // If our camera is above the water we will render the scene flipped upside down.
+  // In order to line up the reflection nicely with the world we have to translate
+  // the world to the position of our reflected surface, multiplied by two.
+  glEnable(GL_CLIP_PLANE0);
+  Vector pos = State::getCameraNode()->getAbsCoor();
+  //pos.debug();
+  //PRINTF(0)("waterheight: %f\n", waterHeight);
+  if(pos.y > waterPos.y)
+  {
+    // Translate the world, then flip it upside down
+    glTranslatef(0.0f, waterPos.y*2.0f, 0.0f);
+    glScalef(1.0, -1.0, 1.0);
+
+    // Since the world is updside down we need to change the culling to FRONT
+    glCullFace(GL_FRONT);
+
+    // Set our plane equation and turn clipping on
+    double plane[4] = {0.0, 1.0, 0.0, -waterPos.y};
+    glClipPlane(GL_CLIP_PLANE0, plane);
+  }
+  else
+  {
+    // If the camera is below the water we don't want to flip the world,
+    // but just render it clipped so only the top is drawn.
+    double plane[4] = {0.0, 1.0, 0.0, waterPos.y};
+    glClipPlane(GL_CLIP_PLANE0, plane);
+  }
+}
+
+
+void MappedWater::deactivateReflection()
+{
+  glDisable(GL_CLIP_PLANE0);
+  glCullFace(GL_BACK);
+
+  //mat.select();
+  /////glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);
+  ///mat.renderToTexture(0, GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);
+  ///
+
+  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0));
+
+  // Create the texture and store it on the video card
+  glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);
+
+
+  glPopMatrix();
+  glPopAttrib();
+}
+
+void MappedWater::activateRefraction()
+{/*
   // save viewport matrix and change the viewport size
   glPushAttrib(GL_VIEWPORT_BIT);
@@ -268,63 +328,4 @@
     glClipPlane(GL_CLIP_PLANE0, plane);
   }
-}
-
-
-void MappedWater::deactivateReflection()
-{
-  glDisable(GL_CLIP_PLANE0);
-  glCullFace(GL_BACK);
-
-  //mat.select();
-  /////glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);
-  ///mat.renderToTexture(0, GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);
-  ///
-
-  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0));
-
-  // Create the texture and store it on the video card
-  glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);
-
-
-  glPopMatrix();
-  glPopAttrib();
-}
-
-void MappedWater::activateRefraction()
-{/*
-  // save viewport matrix and change the viewport size
-  glPushAttrib(GL_VIEWPORT_BIT);
-  glViewport(0,0, textureSize, textureSize);
-
-  glMatrixMode(GL_MODELVIEW);
-  glPushMatrix();
-
-  // If our camera is above the water we will render the scene flipped upside down.
-  // In order to line up the reflection nicely with the world we have to translate
-  // the world to the position of our reflected surface, multiplied by two.
-  glEnable(GL_CLIP_PLANE0);
-  Vector pos = State::getCameraNode()->getAbsCoor();
-  //pos.debug();
-  //PRINTF(0)("waterheight: %f\n", waterHeight);
-  if(pos.y > waterHeight)
-  {
-    // Translate the world, then flip it upside down
-    glTranslatef(0.0f, waterHeight*2.0f, 0.0f);
-    glScalef(1.0, -1.0, 1.0);
-
-    // Since the world is updside down we need to change the culling to FRONT
-    glCullFace(GL_FRONT);
-
-    // Set our plane equation and turn clipping on
-    double plane[4] = {0.0, 1.0, 0.0, -waterHeight};
-    glClipPlane(GL_CLIP_PLANE0, plane);
-  }
-  else
-  {
-    // If the camera is below the water we don't want to flip the world,
-    // but just render it clipped so only the top is drawn.
-    double plane[4] = {0.0, 1.0, 0.0, waterHeight};
-    glClipPlane(GL_CLIP_PLANE0, plane);
-  }
 */
 
@@ -349,7 +350,7 @@
   glEnable(GL_CLIP_PLANE0);
   Vector pos = State::getCameraNode()->getAbsCoor();
-  if(pos.y > waterHeight)
-  {
-    double plane[4] = {0.0, -1.0, 0.0, waterHeight}; 
+  if(pos.y > waterPos.y)
+  {
+    double plane[4] = {0.0, -1.0, 0.0, waterPos.y}; 
     glClipPlane(GL_CLIP_PLANE0, plane);
 
@@ -359,5 +360,5 @@
   {
     glCullFace(GL_FRONT);
-    double plane[4] = {0.0, 1.0, 0.0, -waterHeight}; 
+    double plane[4] = {0.0, 1.0, 0.0, -waterPos.y}; 
     glClipPlane(GL_CLIP_PLANE0, plane);
   }
Index: branches/water/src/world_entities/environments/mapped_water.h
===================================================================
--- branches/water/src/world_entities/environments/mapped_water.h	(revision 8466)
+++ branches/water/src/world_entities/environments/mapped_water.h	(revision 8467)
@@ -32,8 +32,9 @@
   private:
     void setLightPosition(float x, float y, float z) { this->lightPos = Vector(x,y,z); };
-    void setHeight(float height);
+    void setWaterPos(float x, float y, float z) { this->waterPos = Vector(x,y,z); };
 
   private:
-    float               waterHeight;                //!< y-coord of the Water
+    Vector              waterPos;                   //!< position of the water
+    Vector              lightPos;                   //!< position of the light that is used to render the reflection
 
     float               move;                       //!< textures coords, speeds, positions for the shaded textures....
@@ -45,9 +46,8 @@
     float               kNormalMapScale;            //!<
 
-    int                 textureSize;                //!< size of the texture
-    Vector              lightPos;
+    int                 textureSize;                //!< height and width of the texture
     Material            mat;
     Shader*             shader;
-    Shader::Uniform*    cam_uni;                        //!< uniform that is used for the camera position
+    Shader::Uniform*    cam_uni;                    //!< uniform that is used for the camera position
 
 };
