Index: branches/atmospheric_engine/src/lib/collision_reaction/collision_handle.cc
===================================================================
--- branches/atmospheric_engine/src/lib/collision_reaction/collision_handle.cc	(revision 8471)
+++ branches/atmospheric_engine/src/lib/collision_reaction/collision_handle.cc	(revision 8474)
@@ -93,5 +93,5 @@
 
   // add element
-   PRINTF(0)("addTarget: %i \n", target);
+   //PRINTF(0)("addTarget: %i \n", target);
    this->targetList.push_back(target);
 }
Index: branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc	(revision 8471)
+++ branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc	(revision 8474)
@@ -21,5 +21,4 @@
 #include "util/loading/resource_manager.h"
 
-#include "glincl.h"
 #include "material.h"
 #include <math.h>
@@ -31,5 +30,4 @@
 #include "parser/tinyxml/tinyxml.h"
 
-#include "sglmodel.h"
 
 using namespace std;
@@ -43,4 +41,5 @@
 {
 	this->setClassID(CL_CLOUD_EFFECT, "CloudEffect");
+//  this->toList(OM_ENVIRON);
 
 	this->init();
@@ -49,5 +48,5 @@
 		this->loadParams(root);
 
-	if(cloudActivate)
+	//if(cloudActivate)
 		this->activate();
 }
@@ -56,10 +55,4 @@
 {
 	this->deactivate();
-
-	delete this->cloudMaterial;
-
-	cloudModel.Delete();
-	Shader::unload(this->cloudShader);
-
 }
 
@@ -67,34 +60,30 @@
 void CloudEffect::init()
 {
-	PRINTF(1)("Initializing CloudEffect\n");
+	PRINTF(0)("Initializing CloudEffect\n");
+  
+    /// initialization of the texture coords, speeds etc...
+/*  this->move = 0.0f;
+  this->g_WaterUV = 35.0f;
+  this->kNormalMapScale = 0.25f;
+  this->g_WaterFlow = 0.0015f;*/
+  
+  cloudMaterial.setDiffuseMap("pictures/sky/cloud1.jpg", GL_TEXTURE_2D, 0);
 
-	// Default values
-	this->cloudActivate = false;
-	this->cloudTint[4] = ( 0.9f, 0.7f, 0.7f, 1.0f );
-	this->cloudScroll = 1.0f;
-	this->time = 0.0f;
-	//g_cloud_texture = 0;
+  shader = new Shader(ResourceManager::getInstance()->getDataDir() + "/shaders/cloud.vert",
+                      ResourceManager::getInstance()->getDataDir() + "/shaders/cloud.frag");
+  
+  this->shader->activateShader();
 
-	this->cloudTexture = "pictures/sky/cloud1.jpg";
-
-	// cloudModel.Load(ResourceManager::getInstance()->getDataDir() + "/models/cloud.sgl");
-	// cloudModel.Unitize();
-
-	// Get the bounding box of the sky dome
-	float bbox[3] = {0};
-	cloudModel.GetDimensions(bbox[0], bbox[1], bbox[2]);
-
-	// Load Shaders
-	this->cloudShader = new Shader( ResourceManager::getInstance()->getDataDir() + "/shaders/sky.vert", ResourceManager::getInstance()->getDataDir() +"/shaders/sky.frag");
-
-	// Tell the shader the bounding box of the sky dome
-	this->cloudShader->bindShader("bbox", bbox, 4);
-
-	// Initialze Cloud Material
-	this->cloudMaterial = new Material("Sky");
-	this->cloudMaterial->setIllum(3);
-	this->cloudMaterial->setAmbient(1.0, 1.0, 1.0);
-	this->cloudMaterial->setDiffuseMap(this->cloudTexture);
-
+  Shader::Uniform(shader, "Noise").set(0);
+  Shader::Uniform(shader, "SkyColor").set(0.0f, 0.0f, 0.8f);
+  Shader::Uniform(shader, "CloudColor").set(0.8f, 0.8f, 0.8f);
+  
+  // Change: Have to be updated each frame!like camerpos in mapped_water.cc
+  Shader::Uniform(shader, "Offset").set(0.0f, 0.0f, 0.0f);
+  
+  Shader::Uniform(shader, "LightPos").set(100.0f, 100.0f, 100.0f);
+  Shader::Uniform(shader, "Scale").set(1.0f);
+  
+  this->shader->deactivateShader();
 }
 
@@ -106,10 +95,10 @@
 	// LoadParam(root, "speed", this, CloudEffect, setCloudAnimation);
 	// LoadParam(root, "texture", this, CloudEffect, setCloudTexture);
-
+  /*
 	LOAD_PARAM_START_CYCLE(root, element);
 	{
 		LoadParam_CYCLE(element, "option", this, CloudEffect, setCloudOption);
 	}
-	LOAD_PARAM_END_CYCLE(element);
+  LOAD_PARAM_END_CYCLE(element);*/
 }
 
@@ -117,7 +106,7 @@
 void CloudEffect::activate()
 {
-	PRINTF(0)( "Activating CloudEffect with Material %s\n", this->cloudTexture.c_str());
+	PRINTF(0)( "Activating\n");
 
-	this->cloudActivate = true;
+//	this->cloudActivate = true;
 }
 
@@ -126,87 +115,37 @@
 	PRINTF(0)("Deactivating CloudEffect\n");
 
-	this->cloudActivate = false;
+//	this->cloudActivate = false;
 }
 
 void CloudEffect::draw() const
 {
-	if (!this->cloudActivate)
-		return;
+	//if (!this->cloudActivate)
+	//	return;
 
-	// 	glMatrixMode(GL_MODELVIEW);
-	// 	glPushMatrix();
-	//
-	// 	// Move sphere along with the camera
-	// 	Vector r = State::getCameraNode()->getAbsCoor();
-	// 	glTranslatef(r.x, r.y, r.z);
-	//
-	// 	// Sky movement
-	// 	glRotatef(mover, 0, 0, 1);
-	//
-	// 	cloudMaterial->select();
-	// 	gluSphere(this->sphereObj, this->sphereRadius, 20, 20);
-	// 	glPopMatrix();
+  //glMatrixMode(GL_MODELVIEW);
+  //glColor4f(1,1,1,1);
+  glPushMatrix();
+  //glTranslatef(0,this->waterHeight,0);
 
-	// ******
+  cloudMaterial.unselect();
+  cloudMaterial.select();
 
-	glMatrixMode(GL_MODELVIEW);
-	glPushMatrix();
+  this->shader->activateShader();
 
-	// glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
-	// glShadeModel(GL_SMOOTH);
-	// glEnable(GL_DEPTH_TEST);
-	// glEnable(GL_CULL_FACE);
-	// glCullFace(GL_BACK);
-	// glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
 
-	// glLineWidth(3.0f);
+  glBegin(GL_QUADS);
+  
+  glTexCoord2f(1.0f, 1.0f); glVertex3f(0.0f, 0.0f,  0.0f);
+  glTexCoord2f(0.0f, 1.0f); glVertex3f( 0.0f, 0.0f,  100.0f);
+  glTexCoord2f(0.0f, 0.0f); glVertex3f( 100.0f, 0.0f,  100.0f);
+  glTexCoord2f(1.0f, 0.0f); glVertex3f(100.0f, 0.0f,  0.0f);
+  
+  glEnd();
 
-	static float time = 0.0f;
-	// static vector3f eye = {0.0f, 0.0f, 0.0f}, look = {0.0f, 0.0f, 1.0f}, up = {0.0f, 1.0f, 0.0f};
+  this->shader->deactivateShader();
 
-	// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-	// glLoadIdentity();
-	// gluLookAt(eye[x], eye[y], eye[z], look[x], look[y], look[z], up[x], up[y], up[z]);
+  cloudMaterial.unselect();
 
-	// Turn off the depth buffer when rendering the background
-	// glDisable(GL_DEPTH_TEST);
-
-	this->cloudShader->activateShader();
-
-	/* Select the shader program and update parameters. */
-	/* The "time" parameter controls the cloud scrolling. */
-	this->cloudShader->bindShader("time", &time, 1);
-	/* The "horizon" parameter controls the sky tinting. */
-	this->cloudShader->bindShader("horizon", cloudTint, 4);
-
-	glActiveTexture(GL_TEXTURE0 + 0);
-	glActiveTexture(GL_TEXTURE0 + 1);
-
-	// Load the cloud texture
-	//glBindTexture(GL_TEXTURE_2D, g_cloud_texture);
-	this->cloudMaterial->select();
-
-	// Render the sky dome
-	cloudModel.Render();
-
-	// Unselect the shader
-	Shader::deactivateShader();
-
-	/* Turn on the depth buffer when rendering the foreground. */
-	// glEnable(GL_DEPTH_TEST);
-
-	/* Render the forground, for example, a teapot or bunny. */
-	//    glEnable(GL_LIGHTING);
-	//    glColor3f(0.0f, 1.0f, 0.0f);
-	//    glBegin(GL_QUADS);
-	//    glNormal3f( 0.0f,  1.0f,  0.0f);
-	//    glVertex3f( 20.0f, -1.0f,  20.0f);
-	//    glVertex3f( 20.0f, -1.0f, -20.0f);
-	//    glVertex3f(-20.0f, -1.0f, -20.0f);
-	//    glVertex3f(-20.0f, -1.0f,  20.0f);
-	//    glEnd();
-	//    glDisable(GL_LIGHTING);
-
-	glPopMatrix();
+  glPopMatrix();
 
 }
@@ -214,9 +153,6 @@
 void CloudEffect::tick (float dt)
 {
-	if (!this->cloudActivate)
-		return;
-
-	// Update the timer for scrolling the clouds
-	time = time + ((1.0f / 2000.0f) * cloudScroll);
+	//if (!this->cloudActivate)
+	//	return;
 }
 
Index: branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h	(revision 8471)
+++ branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h	(revision 8474)
@@ -12,11 +12,6 @@
 
 #include "world_entity.h"
-#include "glincl.h"
-
-#include "sglmodel.h"
-
-class Shader;
-class Material;
-class Vector;
+#include "material.h"
+#include "shader.h"
 
 class CloudEffect : public WeatherEffect {
@@ -42,27 +37,17 @@
     virtual void tick(float dt);
 
-    inline void setCloudOption(const std::string& option) {
+    /*inline void setCloudOption(const std::string& option) {
         if (option == "activate")
-            this->cloudActivate = true;
-    }
+    this->cloudActivate = true;
+}*/
 
 
 private:
-    void initialize(char* fileName);
+    //void initialize(char* fileName);
 
-    bool        cloudActivate;
+    //bool        cloudActivate;
 
-    Material*     cloudMaterial;    // A Material for the Sphere.
-
-    std::string     cloudTexture;
-
-    Sglmodel_sgl      cloudModel;
-    Shader*       cloudShader;
-
-    GLfloat       cloudTint[4];
-    GLfloat       cloudScroll;
-
-    float       time;
-
+    Material                 cloudMaterial;
+    Shader*                 shader;
 };
 
