Index: branches/water/src/lib/graphics/importer/material.h
===================================================================
--- branches/water/src/lib/graphics/importer/material.h	(revision 8024)
+++ branches/water/src/lib/graphics/importer/material.h	(revision 8025)
@@ -32,4 +32,5 @@
 
     bool select () const;
+    bool activateTextureUnit(unsigned int textureNumber);
     static void unselect();
 
Index: branches/water/src/story_entities/game_world.cc
===================================================================
--- branches/water/src/story_entities/game_world.cc	(revision 8024)
+++ branches/water/src/story_entities/game_world.cc	(revision 8025)
@@ -514,4 +514,5 @@
 void GameWorld::renderPassRefraction()
 {
+/*
     // clear buffer
   glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
@@ -543,5 +544,5 @@
       mw->deactivateRefraction();
     }
-  }
+  }*/
 }
 
Index: branches/water/src/world_entities/environments/mapped_water.cc
===================================================================
--- branches/water/src/world_entities/environments/mapped_water.cc	(revision 8024)
+++ branches/water/src/world_entities/environments/mapped_water.cc	(revision 8025)
@@ -94,5 +94,5 @@
   /// initialization of the shaders
   // load shader files
-  shader = new Shader( ResourceManager::getInstance()->getDataDir() + "/shaders/mapped_water.vert", ResourceManager::getInstance()->getDataDir() +"/shaders/mapped_water.frag");
+/*  shader = new Shader( ResourceManager::getInstance()->getDataDir() + "/shaders/mapped_water.vert", ResourceManager::getInstance()->getDataDir() +"/shaders/mapped_water.frag");
 
   this->shader->activateShader();
@@ -114,11 +114,11 @@
   cam_uni = new Shader::Uniform(shader, "cameraPos");
 
-  this->shader->deactivateShader();
+  this->shader->deactivateShader();*/
 }
 
 MappedWater::~MappedWater()
 {
-  delete shader;
-  delete cam_uni;
+  //delete shader;
+  //delete cam_uni;
 }
 
@@ -140,9 +140,9 @@
   mat.select();
 
-  this->shader->activateShader();
+  ///this->shader->activateShader();
 
   // reset the camera uniform to the current cam position
   Vector pos = State::getCameraNode()->getAbsCoor();
-  cam_uni->set(pos.x, pos.y, pos.z, 1.0f);
+  ///cam_uni->set(pos.x, pos.y, pos.z, 1.0f);
 
   glBegin(GL_QUADS);
@@ -180,5 +180,5 @@
   glEnd();
 
-  this->shader->deactivateShader();
+  ///this->shader->deactivateShader();
 
   mat.unselect();
@@ -212,4 +212,5 @@
   // 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();
   if(pos.y > waterHeight)
@@ -224,5 +225,4 @@
     // Set our plane equation and turn clipping on
     double plane[4] = {0.0, 1.0, 0.0, -waterHeight};
-    glEnable(GL_CLIP_PLANE0);
     glClipPlane(GL_CLIP_PLANE0, plane);
   }
@@ -232,5 +232,4 @@
     // but just render it clipped so only the top is drawn.
     double plane[4] = {0.0, 1.0, 0.0, waterHeight};
-    glEnable(GL_CLIP_PLANE0);
     glClipPlane(GL_CLIP_PLANE0, plane);
   }
@@ -251,8 +250,54 @@
 
 void MappedWater::activateRefraction()
-{
+{/*
+  // To create the refraction and depth textures we do the same thing
+  // we did for the reflection texture, except we don't need to turn
+  // the world upside down.  We want to find the depth of the water,
+  // not the depth of the sky and above water terrain.
+
+  // save viewport matrix and change the viewport size
+  glPushAttrib(GL_VIEWPORT_BIT);
+  glViewport(0,0, textureSize, textureSize);
+
+  glPushMatrix();
+
+  // If our camera is above the water we will render only the parts that
+  // are under the water.  If the camera is below the water we render
+  // only the stuff above the water.  Like the reflection texture, we
+  // incorporate clipping planes to only render what we need.
+
+  // If the camera is above water, render the data below the water
+  glEnable(GL_CLIP_PLANE0);
+  Vector pos = State::getCameraNode()->getAbsCoor();
+  if(pos.y > waterHeight)
+  {
+    double plane[4] = {0.0, -1.0, 0.0, waterHeight}; 
+    glClipPlane(GL_CLIP_PLANE0, plane);
+  }
+  // If the camera is below the water, only render the data above the water
+  else
+  {
+    glCullFace(GL_FRONT);
+    double plane[4] = {0.0, 1.0, 0.0, -waterHeight}; 
+    glClipPlane(GL_CLIP_PLANE0, plane);
+  }*/
 }
 
 void MappedWater::deactivateRefraction()
-{
-}
+{/*
+  glDisable(GL_CLIP_PLANE0);
+  glCullFace(GL_BACK);
+
+  mat.select();
+  // Bind the current scene to our refraction texture
+//  glBindTexture(GL_TEXTURE_2D, g_Texture[REFRACTION_ID]);
+  glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, textureSize, textureSize);
+
+  // Bind the current scene to our depth texture
+//  glBindTexture(GL_TEXTURE_2D, g_Texture[DEPTH_ID]);
+  glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 0, 0, textureSize, textureSize, 0);
+
+  glPopMatrix();
+  glPopAttrib();
+  */
+}
