Index: orxonox/branches/shadows/src/shadow.cc
===================================================================
--- orxonox/branches/shadows/src/shadow.cc	(revision 3737)
+++ orxonox/branches/shadows/src/shadow.cc	(revision 3760)
@@ -81,10 +81,5 @@
     glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,SIZE,SIZE,0,GL_RGB,GL_UNSIGNED_BYTE,NULL);
 
-    this->ground_id=glGenLists(1);
-    glNewList(this->ground_id,GL_COMPILE);
-    
-    setGround();
-    
-    glEndList();
+   
     
     this->player_id=glGenLists(1);
@@ -99,5 +94,13 @@
 
 }
-
+void Shadow::createGroundList(){
+     this->ground_id=glGenLists(1);
+     glNewList(this->ground_id,GL_COMPILE);
+    
+     setGround();
+    
+     glEndList();
+
+}
 
 void Shadow::createShadow()
@@ -260,9 +263,9 @@
     //glClearColor(0,0,0,0);
     //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-    glMatrixMode(GL_PROJECTION);
-    glLoadIdentity();
-    gluPerspective(45,4.0/3.0,.5,100);
-    glMatrixMode(GL_MODELVIEW);
-    glLoadIdentity();
+    //glMatrixMode(GL_PROJECTION);
+    //glLoadIdentity();
+    //gluPerspective(45,4.0/3.0,.5,100);
+    //glMatrixMode(GL_MODELVIEW);
+    //glLoadIdentity();
     
     
Index: orxonox/branches/shadows/src/shadow.h
===================================================================
--- orxonox/branches/shadows/src/shadow.h	(revision 3737)
+++ orxonox/branches/shadows/src/shadow.h	(revision 3760)
@@ -53,4 +53,5 @@
 	void init();
 	void createShadow();
+	void createGroundList();
 	void draw();
 	void setGround();
Index: orxonox/branches/shadows/src/world.cc
===================================================================
--- orxonox/branches/shadows/src/world.cc	(revision 3737)
+++ orxonox/branches/shadows/src/world.cc	(revision 3760)
@@ -294,5 +294,6 @@
 	    
 	    this->shadow =new Shadow(myPlayer->model,(Player*)myPlayer);	    
-	    shadow->init();	    	    
+	    //shadow->init();	   
+	    first=true; 	    
 	    
 	    //create skysphere
@@ -383,5 +384,15 @@
   // initialize debug coord system
   
- 
+ 	objectList = glGenLists(1);
+	glNewList (objectList, GL_COMPILE);
+	glLoadIdentity();
+	//glColor3f(1.0,0,0);
+  
+	// Enabling Textures
+	glEnable(GL_TEXTURE_2D);
+  
+	// Selecting the new Ground Material.
+	
+    
   
   
@@ -393,22 +404,5 @@
   // Setting the illumination mode otherwise it is flat-shaded.
   boden->setIllum(3);
-  
-    
-  objectList = glGenLists(1);
-  glNewList (objectList, GL_COMPILE);
-  glLoadIdentity();
-  //glColor3f(1.0,0,0);
-  
-  // Enabling Textures
-  glEnable(GL_TEXTURE_2D);
-  
-  // Selecting the new Ground Material.
   boden->select();
-  
-  
-  
-  
-  
-  
   int sizeX = 100;
   int sizeZ = 80;
@@ -418,5 +412,7 @@
   float widthZ = float (width /sizeZ);
   
-  float height [sizeX][sizeZ];
+  float 
+  
+  height [sizeX][sizeZ];
   Vector normal_vectors[sizeX][sizeZ];
   Vector vertexes[sizeX][sizeZ];
@@ -459,17 +455,18 @@
 	shadow->setNormal(normal_vectors[i][j],i,j);
       }
-
-  
+      
+      
+       
   for ( int i = 0; i<sizeX; i+=1)
     for (int j = 0; j<sizeZ;j+=1)
       {	  
-	Vector v1 = Vector (widthX*(i),      height[i][j]-20,       widthZ*(j)  -width/2);
+        Vector v1 = Vector (widthX*(i),      height[i][j]-20,       widthZ*(j)  -width/2);
 	Vector v2 = Vector (widthX*(i+1),    height[i+1][j]-20,     widthZ*(j)  -width/2);
 	Vector v3 = Vector (widthX*(i+1),    height[i+1][j+1]-20,   widthZ*(j+1)-width/2);
 	Vector v4 = Vector (widthX*(i),      height[i][j+1]-20,     widthZ*(j+1)-width/2);
 	float a[3];
-	a[0]=1.0;
-	a[1]=1.0;
-	a[2]=1.0;
+	a[0]=.8;
+	a[1]=.8;
+	a[2]=.8;
 	glMaterialfv(GL_FRONT,GL_DIFFUSE,a);
 	shadow->setVertexNum(v1,i,j,0);
@@ -478,6 +475,5 @@
 	shadow->setVertexNum(v4,i,j,3);
 	
-	
-		
+			
 	
 	glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z);
@@ -502,4 +498,9 @@
 	
       }
+      if(first){
+	shadow->createGroundList();
+	first=false;
+	}
+	
   glEnd();
   
@@ -526,6 +527,7 @@
   delete trackManager;
     
-  glEndList();  
-  shadow->init();
+  glEndList();
+ shadow->init();  
+  
 }
 
Index: orxonox/branches/shadows/src/world.h
===================================================================
--- orxonox/branches/shadows/src/world.h	(revision 3737)
+++ orxonox/branches/shadows/src/world.h	(revision 3760)
@@ -78,4 +78,5 @@
   bool bQuitCurrentGame; //!> quit only the current game and return to menu
   bool bPause;
+  bool first;
 
   GLMenuImageScreen* glmis;
