Index: trunk/src/world_entities/environments/mapped_water.cc
===================================================================
--- trunk/src/world_entities/environments/mapped_water.cc	(revision 10033)
+++ trunk/src/world_entities/environments/mapped_water.cc	(revision 10034)
@@ -52,4 +52,12 @@
   this->registerObject(this, MappedWater::_objectList);
   this->toList(OM_ENVIRON);
+  
+  cam_uni = NULL;
+  light_uni = NULL;
+  color_uni = NULL;
+  shineSize_uni = NULL;
+  shineStrength_uni = NULL;
+  reflStrength_uni = NULL;
+  refr_uni = NULL;
 
   /// sets start values and parameters
@@ -78,11 +86,24 @@
 MappedWater::~MappedWater()
 {
-  delete cam_uni;
-  delete color_uni;
-  delete light_uni;
-  delete shineSize_uni;
-  delete shineStrength_uni;
-  delete reflStrength_uni;
-  delete refr_uni;
+  if ( cam_uni )
+    delete cam_uni;
+  
+  if ( color_uni )
+    delete color_uni;
+  
+  if ( light_uni )
+    delete light_uni;
+  
+  if ( shineSize_uni )
+    delete shineSize_uni;
+  
+  if ( shineStrength_uni )
+    delete shineStrength_uni;
+  
+  if ( reflStrength_uni )
+    delete reflStrength_uni;
+  
+  if ( refr_uni )
+    delete refr_uni;
 }
 
@@ -164,4 +185,9 @@
 void MappedWater::initShaders()
 {
+  if ( !Shader::isSupported() )
+  {
+	return;
+  }
+	
   // load shader files
   shader = ResourceShader( "shaders/mapped_water.vert", "shaders/mapped_water.frag");
@@ -225,4 +251,9 @@
 void MappedWater::resetWaterColor(float r, float g, float b)
 {
+  if ( !Shader::isSupported() )
+  {
+	return;
+  }
+  
   this->shader.activateShader();
   this->waterColor = Vector(r, g, b);
@@ -240,4 +271,9 @@
 void MappedWater::resetShineSize(float shine)
 {
+  if ( !Shader::isSupported() )
+  {
+	return;
+  }
+  
   this->shader.activateShader();
   this->shineSize = shine;
@@ -255,4 +291,9 @@
 void MappedWater::resetShineStrength(float strength)
 {
+  if ( !Shader::isSupported() )
+  {
+	return;
+  }
+  
   this->shader.activateShader();
   this->shineStrength = strength;
@@ -270,4 +311,9 @@
 void MappedWater::resetReflStrength(float strength)
 {
+  if ( !Shader::isSupported() )
+  {
+	return;
+  }
+  
   this->shader.activateShader();
   this->reflStrength = strength;
@@ -285,4 +331,9 @@
 void MappedWater::resetRefraction(float refraction)
 {
+  if ( !Shader::isSupported() )
+  {
+	return;
+  }
+  
   this->shader.activateShader();
   this->refraction = refraction;
@@ -302,4 +353,9 @@
 void MappedWater::resetLightPos(float x, float y, float z)
 {
+  if ( !Shader::isSupported() )
+  {
+	return;
+  }
+  
   this->shader.activateShader();
   this->lightPos = Vector(x, y, z);
@@ -555,46 +611,47 @@
 
   mat.select();
-
-  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);
-
-  glDisable(GL_BLEND);
-
-  // TODO change texture coords, so water doesnt look distorted when xWidth != zWidth
-  glBegin(GL_QUADS);
-  // The back left vertice for the water
-  glMultiTexCoord2f(GL_TEXTURE0, 0, waterUV);                   // Reflection texture
-  glMultiTexCoord2f(GL_TEXTURE1, 0, waterUV - move);            // Refraction texture
-  glMultiTexCoord2f(GL_TEXTURE2, 0, normalUV + move2);          // Normal map texture
-  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
-  glVertex3f(this->waterVerts[0], this->waterHeight, this->waterVerts[1]);
-
-  // The front left vertice for the water
-  glMultiTexCoord2f(GL_TEXTURE0, 0, 0);                         // Reflection texture
-  glMultiTexCoord2f(GL_TEXTURE1, 0, -move);                     // Refraction texture
-  glMultiTexCoord2f(GL_TEXTURE2, 0, move2);                     // Normal map texture
-  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
-  glVertex3f(this->waterVerts[2], this->waterHeight, this->waterVerts[3]);
-
-  // The front right vertice for the water
-  glMultiTexCoord2f(GL_TEXTURE0, waterUV, 0);                   // Reflection texture
-  glMultiTexCoord2f(GL_TEXTURE1, waterUV, -move);               // Refraction texture
-  glMultiTexCoord2f(GL_TEXTURE2, normalUV, move2);              // Normal map texture
-  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
-  glVertex3f(this->waterVerts[4], this->waterHeight, this->waterVerts[5]);
-
-  // The back right vertice for the water
-  glMultiTexCoord2f(GL_TEXTURE0, waterUV, waterUV);             // Reflection texture
-  glMultiTexCoord2f(GL_TEXTURE1, waterUV, waterUV - move);      // Refraction texture
-  glMultiTexCoord2f(GL_TEXTURE2, normalUV, normalUV + move2);   // Normal map texture
-  glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
-  glVertex3f(this->waterVerts[6], this->waterHeight, this->waterVerts[7]);
-  glEnd();
-
-  this->shader.deactivateShader();
-
+  if ( Shader::isSupported() )
+  {
+    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);
+  
+    glDisable(GL_BLEND);
+  
+    // TODO change texture coords, so water doesnt look distorted when xWidth != zWidth
+    glBegin(GL_QUADS);
+    // The back left vertice for the water
+    glMultiTexCoord2f(GL_TEXTURE0, 0, waterUV);                   // Reflection texture
+    glMultiTexCoord2f(GL_TEXTURE1, 0, waterUV - move);            // Refraction texture
+    glMultiTexCoord2f(GL_TEXTURE2, 0, normalUV + move2);          // Normal map texture
+    glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
+    glVertex3f(this->waterVerts[0], this->waterHeight, this->waterVerts[1]);
+  
+    // The front left vertice for the water
+    glMultiTexCoord2f(GL_TEXTURE0, 0, 0);                         // Reflection texture
+    glMultiTexCoord2f(GL_TEXTURE1, 0, -move);                     // Refraction texture
+    glMultiTexCoord2f(GL_TEXTURE2, 0, move2);                     // Normal map texture
+    glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
+    glVertex3f(this->waterVerts[2], this->waterHeight, this->waterVerts[3]);
+  
+    // The front right vertice for the water
+    glMultiTexCoord2f(GL_TEXTURE0, waterUV, 0);                   // Reflection texture
+    glMultiTexCoord2f(GL_TEXTURE1, waterUV, -move);               // Refraction texture
+    glMultiTexCoord2f(GL_TEXTURE2, normalUV, move2);              // Normal map texture
+    glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
+    glVertex3f(this->waterVerts[4], this->waterHeight, this->waterVerts[5]);
+  
+    // The back right vertice for the water
+    glMultiTexCoord2f(GL_TEXTURE0, waterUV, waterUV);             // Reflection texture
+    glMultiTexCoord2f(GL_TEXTURE1, waterUV, waterUV - move);      // Refraction texture
+    glMultiTexCoord2f(GL_TEXTURE2, normalUV, normalUV + move2);   // Normal map texture
+    glMultiTexCoord2f(GL_TEXTURE3, 0, 0);                         // DUDV map texture
+    glVertex3f(this->waterVerts[6], this->waterHeight, this->waterVerts[7]);
+    glEnd();
+  
+    this->shader.deactivateShader();
+  }
   mat.unselect();
 
Index: trunk/src/world_entities/environments/mapped_water.h
===================================================================
--- trunk/src/world_entities/environments/mapped_water.h	(revision 10033)
+++ trunk/src/world_entities/environments/mapped_water.h	(revision 10034)
@@ -33,4 +33,5 @@
 template <class T> class tAnimation;
 
+//TODO show some wather for people without shader support
 class MappedWater : public WorldEntity
 {
Index: trunk/src/world_entities/skydome.cc
===================================================================
--- trunk/src/world_entities/skydome.cc	(revision 10033)
+++ trunk/src/world_entities/skydome.cc	(revision 10034)
@@ -106,25 +106,27 @@
   glBindTexture(GL_TEXTURE_3D, texture);
 
-  this->shader->activateShader();
-
-  glPushMatrix();
-  glTranslatef(0.0f,pRadius,0.0f);
-
-  glBegin(GL_TRIANGLES);
-  for (int i=0; i < numIndices; i++)
-  {
-    glColor3f(1.0f, 1.0f, 1.0f);
-
-    glTexCoord2f(planeVertices[indices[i]].u, planeVertices[indices[i]].v);
-    glVertex3f(planeVertices[indices[i]].x, planeVertices[indices[i]].y, planeVertices[indices[i]].z);
-  }
-  glEnd();
-
-  WorldEntity::draw();
-
-  glPopMatrix();
-
-  this->shader->deactivateShader();
-
+  if ( this->shader && Shader::isSupported() )
+  {
+    this->shader->activateShader();
+  
+    glPushMatrix();
+    glTranslatef(0.0f,pRadius,0.0f);
+  
+    glBegin(GL_TRIANGLES);
+    for (int i=0; i < numIndices; i++)
+    {
+      glColor3f(1.0f, 1.0f, 1.0f);
+  
+      glTexCoord2f(planeVertices[indices[i]].u, planeVertices[indices[i]].v);
+      glVertex3f(planeVertices[indices[i]].x, planeVertices[indices[i]].y, planeVertices[indices[i]].z);
+    }
+    glEnd();
+  
+    WorldEntity::draw();
+  
+    glPopMatrix();
+  
+    this->shader->deactivateShader();
+  }
   glPopAttrib();
 }
Index: trunk/src/world_entities/weather_effects/cloud_effect.cc
===================================================================
--- trunk/src/world_entities/weather_effects/cloud_effect.cc	(revision 10033)
+++ trunk/src/world_entities/weather_effects/cloud_effect.cc	(revision 10034)
@@ -121,17 +121,20 @@
     this->skydome->setTexture(noise3DTexName);
 
-    this->shader = ResourceShader("/shaders/cloud.vert", "/shaders/cloud.frag");
-
-    this->shader.activateShader();
-
-    Shader::Uniform(shader, "Noise").set(0);
-
-    this->offset = new Shader::Uniform(shader, "Offset");
-    this->skycolor = new Shader::Uniform(shader, "SkyColor");
-    this->cloudcolor = new Shader::Uniform(shader, "CloudColor");
-
-    this->shader.deactivateShader();
-
-    this->skydome->setShader(&shader);
+    if ( Shader::isSupported() )
+    {
+      this->shader = ResourceShader("/shaders/cloud.vert", "/shaders/cloud.frag");
+      
+      this->shader.activateShader();
+      
+      Shader::Uniform(shader, "Noise").set(0);
+      
+      this->offset = new Shader::Uniform(shader, "Offset");
+      this->skycolor = new Shader::Uniform(shader, "SkyColor");
+      this->cloudcolor = new Shader::Uniform(shader, "CloudColor");
+      
+      this->shader.deactivateShader();
+      
+      this->skydome->setShader(&shader);
+    }
 }
 
@@ -186,5 +189,5 @@
 void CloudEffect::tick (float dt) {
 
-    if (this->cloudActivate) {
+    if ( this->cloudActivate && Shader::isSupported() ) {
 
         this->offsetZ += 0.05 * dt * this->animationSpeed;
