Index: /orxonox/branches/parenting/src/debug.h
===================================================================
--- /orxonox/branches/parenting/src/debug.h	(revision 3344)
+++ /orxonox/branches/parenting/src/debug.h	(revision 3345)
@@ -3,4 +3,5 @@
 
 #ifdef  DEBUG
+extern int verbose;
 #define PRINTF(x) \
            PRINTF ## x
Index: /orxonox/branches/parenting/src/importer/texture.cc
===================================================================
--- /orxonox/branches/parenting/src/importer/texture.cc	(revision 3344)
+++ /orxonox/branches/parenting/src/importer/texture.cc	(revision 3345)
@@ -137,12 +137,4 @@
   if (this->texture)
     glDeleteTextures(1, &this->texture);
-}
-
-/**
-   \returns The Texture-identifier number.
-*/
-GLuint Texture::getTexture(void)
-{
-    return this->texture;
 }
 
Index: /orxonox/branches/parenting/src/importer/texture.h
===================================================================
--- /orxonox/branches/parenting/src/importer/texture.h	(revision 3344)
+++ /orxonox/branches/parenting/src/importer/texture.h	(revision 3345)
@@ -72,5 +72,5 @@
   ~Texture(void);
 
-  GLuint getTexture(void);
+  inline GLuint getTexture(void) {return this->texture;} //!< \returns The textureID of this texture.
   bool loadTexToGL (Image* pImage);
 
Index: /orxonox/branches/parenting/src/world.cc
===================================================================
--- /orxonox/branches/parenting/src/world.cc	(revision 3344)
+++ /orxonox/branches/parenting/src/world.cc	(revision 3345)
@@ -27,6 +27,5 @@
 #include "null_parent.h"
 #include "helper_parent.h"
-
-#include <SDL/SDL_image.h>
+#include "importer/texture.h"
 
 using namespace std;
@@ -156,71 +155,6 @@
   glMatrixMode(GL_MODELVIEW); 
 
-
-  SDL_Surface *pBitmap[1];
-  unsigned int textureArray[1];
-  char *strFileName = "orx_tex.bmp";
-  int textureID = 0;
-  
-  pBitmap[0] = SDL_LoadBMP (strFileName);
-  if( pBitmap[0] == NULL)
-    return;
-  
-  if(pBitmap[0] == NULL)                                // If we can't load the file, quit!
-    {
-      printf (" Failed loading %s\n", strFileName);
-      SDL_Quit ();
-    }
-  glGenTextures(1, &textureArray[textureID]);
-  /* Bind the texture to the texture arrays index and init the texture */
-  glBindTexture(GL_TEXTURE_2D, textureArray[textureID]);
-  
-  /* Rearrange the pixelData since openGL has a different pixel orientation */
-  int width  = pBitmap[0]->w;
-  int height = pBitmap[0]->h;
-  unsigned char * data = (unsigned char *)(pBitmap[0]->pixels);
-  unsigned char * newData = new unsigned char[width * height * 3];
-  int channels = 3; /* RGB channel number*/
-  
-  int bytesPerPixel = pBitmap[0]->format->BytesPerPixel; 
-  
-  /* this is the real swapping algorithm */
-  for( int i = 0 ; i < (height / 2) ; ++i )
-    for( int j = 0 ; j < width * bytesPerPixel; j += bytesPerPixel )
-      for(int k = 0; k < bytesPerPixel; ++k)
-	swap( data[ (i * width * bytesPerPixel) + j + k], data[ ( (height - i - 1) * width * bytesPerPixel ) + j + k]);
-  
-  // the following lines extract R,G and B values from any bitmap
-  
-  for(int i = 0; i < (width * height); ++i)
-    {
-      byte r,g,b;
-      Uint32 pixel_value = 0;      
-      /* the following loop extracts the pixel (however wide it is 8,16,24 or 32) and 
-	 creates a long with all these bytes taken together.
-      */
-      
-      for(int j = bytesPerPixel - 1 ; j >= 0; --j)
-        {
-	  pixel_value = pixel_value << 8; 
-	  pixel_value = pixel_value | data[ (i * bytesPerPixel) + j ]; 
-        }                                                              
-      
-      SDL_GetRGB(pixel_value, pBitmap[0]->format, (Uint8 *)&r, (Uint8 *)&g, (Uint8 *)&b);
-      
-      newData[(i * channels) + 0] = r;
-      newData[(i * channels) + 1] = g;
-      newData[(i * channels) + 2] = b;
-   
-      pixel_value = 0;
-    }
-  
-  /* Build Mipmaps (builds different versions of the picture for distances - looks better) */
-  gluBuild2DMipmaps (GL_TEXTURE_2D, 3, pBitmap[0]->w, pBitmap[0]->h, GL_RGB, GL_UNSIGNED_BYTE, newData);
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);    
-  glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
-
-  delete [] newData;    
-  SDL_FreeSurface(pBitmap[0]);
-
+  Texture* loadScreenTexture = new Texture();
+  loadScreenTexture->loadImage("orx_tex.bmp");
 
   /* ------------painten */
@@ -268,6 +202,5 @@
   SDL_GL_SwapBuffers();                    
 
-  glDisable (GL_TEXTURE_2D);
-  glDeleteTextures (1, &textureArray[textureID]);
+  delete loadScreenTexture;
   SDL_Delay (1000);
   printf ("World::displayLoadScreen - end\n"); 
