Index: orxonox/trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 3621)
+++ orxonox/trunk/src/lib/graphics/graphics_engine.cc	(revision 3622)
@@ -160,4 +160,10 @@
 }
 
+/**
+   \brief if Textures should be enabled
+*/
+bool GraphicsEngine::texturesEnabled = true;
+
+
 
 
Index: orxonox/trunk/src/lib/graphics/importer/texture.cc
===================================================================
--- orxonox/trunk/src/lib/graphics/importer/texture.cc	(revision 3621)
+++ orxonox/trunk/src/lib/graphics/importer/texture.cc	(revision 3622)
@@ -21,4 +21,6 @@
 
 #include "texture.h"
+
+#include "graphics_engine.h"
 
 // headers only for PathList
@@ -195,61 +197,66 @@
 bool Texture::loadTexToGL (Image* pImage)
 {
-  PRINTF(4)("Loading texture to OpenGL-Environment.\n");
-  glGenTextures(1, &this->texture);
-  glBindTexture(GL_TEXTURE_2D, this->texture);
-  /* not Working, and not needed. 
-  glTexImage2D( GL_TEXTURE_2D, 0, 3, width,
-		height, 0, GL_BGR,
-		GL_UNSIGNED_BYTE, map->pixels );
-  */ 
-  gluBuild2DMipmaps(GL_TEXTURE_2D, 3, pImage->width, pImage->height, pImage->format, GL_UNSIGNED_BYTE, pImage->data);
-  
-  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
-  glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR);	
-}
-
+  if (GraphicsEngine::texturesEnabled)
+    {
+      PRINTF(4)("Loading texture to OpenGL-Environment.\n");
+      glGenTextures(1, &this->texture);
+      glBindTexture(GL_TEXTURE_2D, this->texture);
+      /* not Working, and not needed. 
+	 glTexImage2D( GL_TEXTURE_2D, 0, 3, width,
+	 height, 0, GL_BGR,
+	 GL_UNSIGNED_BYTE, map->pixels );
+      */ 
+      gluBuild2DMipmaps(GL_TEXTURE_2D, 3, pImage->width, pImage->height, pImage->format, GL_UNSIGNED_BYTE, pImage->data);
+      
+      glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST);
+      glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR);	
+    }
+}
 
 #ifdef HAVE_SDL_SDL_IMAGE_H
 bool Texture::loadImage(char* imageName)
 {
-  char* imgNameWithPath = searchTextureInPaths(imageName);
-  if (imgNameWithPath)
-    {
-      this->map=IMG_Load(imgNameWithPath);
-      if(!map)
-	{
-	  PRINTF(1)("IMG_Load: %s\n", IMG_GetError());
+  if (GraphicsEngine::texturesEnabled)
+    {
+      char* imgNameWithPath = searchTextureInPaths(imageName);
+      if (imgNameWithPath)
+	{
+	  this->map=IMG_Load(imgNameWithPath);
+	  if(!map)
+	    {
+	      PRINTF(1)("IMG_Load: %s\n", IMG_GetError());
+	      return false;
+	    }
+	  pImage->height = map->h;
+	  pImage->width  = map->w;
+	  pImage->data   = (GLubyte*)map->pixels;
+	  pImage->bpp    = map->format->BytesPerPixel;
+	  if (pImage->bpp == 3)
+	    pImage->format = GL_RGB;
+	  else if (pImage->bpp == 4)
+	    pImage->format = GL_RGBA;
+	  
+	  if( !IMG_isPNG(SDL_RWFromFile(imgNameWithPath, "rb")) && !IMG_isJPG(SDL_RWFromFile(imgNameWithPath, "rb")))
+	    for (int i=0;i<map->h * map->w *3;i+=3)
+	      { 
+		GLuint temp = pImage->data[i];
+		pImage->data[i] = pImage->data[i+2];
+		pImage->data[i+2] = temp;
+	      }
+	  /* this is the real swapping algorithm */
+	  for( int i = 0 ; i < (pImage->height / 2) ; ++i )
+	    for( int j = 0 ; j < pImage->width * pImage->bpp; j += pImage->bpp )
+	      for(int k = 0; k < pImage->bpp; ++k)
+		swap( pImage->data[ (i * pImage->width * pImage->bpp) + j + k], pImage->data[ ( (pImage->height - i - 1) * pImage->width * pImage->bpp ) + j + k]);
+	  
+	  this->loadTexToGL (this->pImage);
+	  SDL_FreeSurface(map);
+	  this->pImage->data = NULL;
+	}
+      else
+	{
+	  PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
 	  return false;
 	}
-      pImage->height = map->h;
-      pImage->width  = map->w;
-      pImage->data   = (GLubyte*)map->pixels;
-      pImage->bpp    = map->format->BytesPerPixel;
-      if (pImage->bpp == 3)
-	pImage->format = GL_RGB;
-      else if (pImage->bpp == 4)
-	pImage->format = GL_RGBA;
-	  
-      if( !IMG_isPNG(SDL_RWFromFile(imgNameWithPath, "rb")) && !IMG_isJPG(SDL_RWFromFile(imgNameWithPath, "rb")))
-	for (int i=0;i<map->h * map->w *3;i+=3)
-	  { 
-	    GLuint temp = pImage->data[i];
-	    pImage->data[i] = pImage->data[i+2];
-	    pImage->data[i+2] = temp;
-	  }
-      /* this is the real swapping algorithm */
-      for( int i = 0 ; i < (pImage->height / 2) ; ++i )
-	for( int j = 0 ; j < pImage->width * pImage->bpp; j += pImage->bpp )
-	  for(int k = 0; k < pImage->bpp; ++k)
-	    swap( pImage->data[ (i * pImage->width * pImage->bpp) + j + k], pImage->data[ ( (pImage->height - i - 1) * pImage->width * pImage->bpp ) + j + k]);
- 
-      this->loadTexToGL (this->pImage);
-      SDL_FreeSurface(map);
-      this->pImage->data = NULL;
-    }
-  else
-    {
-      PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
-      return false;
     }
 }
@@ -264,41 +271,43 @@
 bool Texture::loadImage(char* imageName)
 {
-  char* imgNameWithPath = searchTextureInPaths(imageName);
-  if (imgNameWithPath)
-    {
-      if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".bmp", 4))
-	{
-	  PRINTF(4)("Requested bmp-image. Trying to Import.\n");
-	  return this->loadBMP(imgNameWithPath);
-	}
-      
-      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".jpg", 4) || !strncmp(imgNameWithPath+strlen(imgNameWithPath)-5, ".jpg", 5))
-	{
-	  PRINTF(4)("Requested jpeg-image. Trying to Import\n");
-	  return this->loadJPG(imgNameWithPath);
-	}
-      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".tga", 4))
-	{
-	  PRINTF(4)("Requested tga-image. Trying to Import\n");
-	  return this->loadTGA(imgNameWithPath);
-	}
-      else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".png", 4))
-	{
-	  PRINTF(4)("Requested png-image. Trying to Import\n");
-	  return this->loadPNG(imgNameWithPath);
+  if (GraphicsEngine::texturesEnabled)
+    {
+      char* imgNameWithPath = searchTextureInPaths(imageName);
+      if (imgNameWithPath)
+	{
+	  if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".bmp", 4))
+	    {
+	      PRINTF(4)("Requested bmp-image. Trying to Import.\n");
+	      return this->loadBMP(imgNameWithPath);
+	    }
+	  
+	  else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".jpg", 4) || !strncmp(imgNameWithPath+strlen(imgNameWithPath)-5, ".jpg", 5))
+	    {
+	      PRINTF(4)("Requested jpeg-image. Trying to Import\n");
+	      return this->loadJPG(imgNameWithPath);
+	    }
+	  else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".tga", 4))
+	    {
+	      PRINTF(4)("Requested tga-image. Trying to Import\n");
+	      return this->loadTGA(imgNameWithPath);
+	    }
+	  else if (!strncmp(imgNameWithPath+strlen(imgNameWithPath)-4, ".png", 4))
+	    {
+	      PRINTF(4)("Requested png-image. Trying to Import\n");
+	      return this->loadPNG(imgNameWithPath);
+	    }
+	  else
+	    {
+	      PRINTF(2)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
+	      return false;
+	    }
 	}
       else
 	{
-	  PRINTF(2)("Requested Image was not recognized in its type. (Maybe a type-Cast-error.)\n FileName: %s", imgNameWithPath);
+	  PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
 	  return false;
 	}
     }
-  else
-    {
-      PRINTF(2)("Image not Found: %s\n", imgNameWithPath);
-      return false;
-    }
-}
-
+}
 /**
    \brief reads in a Windows BMP-file, and imports it to openGL.
