Index: trunk/src/world_entities/skybox.cc
===================================================================
--- trunk/src/world_entities/skybox.cc	(revision 7327)
+++ trunk/src/world_entities/skybox.cc	(revision 7328)
@@ -121,55 +121,61 @@
 
 /**
- *  sets A set of textures when just giving a Name and an extension:
-
-   usage: give this function an argument like
-   setTexture("skybox", "jpg");
-   and it will convert this to
-   setTextures("skybox_top.jpg", "skybox_bottom.jpg", "skybox_left.jpg",
-               "skybox_right.jpg", "skybox_front.jpg", "skybox_back.jpg");
-*/
+ * @brief sets A set of textures when just giving a Name and an extension:
+ * @param name the prefix of the Name
+ * @param extension the file extension (jpg by default)
+ * usage: give this function an argument like
+ * setTexture("skybox", "jpg");
+ * and it will convert this to
+ * setTextures("skybox_negx.jpg", "skybox_posx.jpg", "skybox_negy.jpg",
+ *             "skybox_posy.jpg", "skybox_negz.jpg", "skybox_posz.jpg");
+ */
 void SkyBox::setTextureAndType(const std::string& name, const std::string& extension)
 {
-  std::string top = name + "_top." + extension;
-  std::string bottom = name + "_bottom." + extension;
-  std::string left = name + "_left." + extension;
-  std::string right = name + "_right." + extension;
-  std::string front = name + "_front." + extension;
-  std::string back = name + "_back." + extension;
-
-  this->setTextures(top, bottom, left, right, front, back);
-}
-
-/**
- *  Defines which textures should be loaded onto the SkyBox.
- * @param top the top texture.
- * @param bottom the bottom texture.
- * @param left the left texture.
- * @param right the right texture.
- * @param front the front texture.
- * @param back the back texture.
-*/
-void SkyBox::setTextures(const std::string& top, const std::string& bottom, const std::string& left,
-                          const std::string& right, const std::string& front, const std::string& back)
-{
-  this->material[0]->setDiffuseMap(top);
-  this->material[1]->setDiffuseMap(bottom);
-  this->material[2]->setDiffuseMap(left);
-  this->material[3]->setDiffuseMap(right);
-  this->material[4]->setDiffuseMap(front);
-  this->material[5]->setDiffuseMap(back);
+  std::string negX = name + "_negx." + extension;
+  std::string posX = name + "_posx." + extension;
+
+  std::string negY = name + "_negy." + extension;
+  std::string posY = name + "_posy." + extension;
+
+  std::string negZ = name + "_negz." + extension;
+  std::string posZ = name + "_posz." + extension;
+
+  this->setTextures(negX, posX, negY, posY, negZ, posZ);
+}
+
+/**
+ * @brief Defines which textures should be loaded onto the SkyBox.
+ * @param negX the top texture.
+ * @param posX the bottom texture.
+ * @param negY the left texture.
+ * @param posY the right texture.
+ * @param negZ the front texture.
+ * @param posZ the back texture.
+*/
+void SkyBox::setTextures(const std::string& negX, const std::string& posX,
+                         const std::string& negY, const std::string& posY,
+                         const std::string& negZ, const std::string& posZ)
+{
+  this->material[0]->setDiffuseMap(negX);
+  this->material[1]->setDiffuseMap(posX);
+  this->material[2]->setDiffuseMap(negY);
+  this->material[3]->setDiffuseMap(posY);
+  this->material[4]->setDiffuseMap(negZ);
+  this->material[5]->setDiffuseMap(posZ);
   if (GLEW_EXT_texture_cube_map)
-    this->loadCubeMapTextures(top, bottom, left, right, front, back);
-}
-
-void SkyBox::loadCubeMapTextures(const std::string& top, const std::string& bottom, const std::string& left,
-                                  const std::string& right, const std::string& front, const std::string& back)
-{
-  this->cubeTexture[0] = (Texture*)ResourceManager::getInstance()->load(top, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT);
-  this->cubeTexture[1] = (Texture*)ResourceManager::getInstance()->load(bottom, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT);
-  this->cubeTexture[2] = (Texture*)ResourceManager::getInstance()->load(left, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT);
-  this->cubeTexture[3] = (Texture*)ResourceManager::getInstance()->load(right, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT);
-  this->cubeTexture[4] = (Texture*)ResourceManager::getInstance()->load(front, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT);
-  this->cubeTexture[5] = (Texture*)ResourceManager::getInstance()->load(back, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT);
+    this->loadCubeMapTextures(negX, posX, negY, posY, negZ, posZ);
+}
+
+void SkyBox::loadCubeMapTextures(const std::string& posY, const std::string& negY, const std::string& negZ,
+                                  const std::string& posZ, const std::string& posX, const std::string& negX)
+{
+  this->cubeTexture[0] = (Texture*)ResourceManager::getInstance()->load(negX, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT);
+  this->cubeTexture[1] = (Texture*)ResourceManager::getInstance()->load(posX, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT);
+
+  this->cubeTexture[2] = (Texture*)ResourceManager::getInstance()->load(negY, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT);
+  this->cubeTexture[3] = (Texture*)ResourceManager::getInstance()->load(posY, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT);
+
+  this->cubeTexture[4] = (Texture*)ResourceManager::getInstance()->load(negZ, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT);
+  this->cubeTexture[5] = (Texture*)ResourceManager::getInstance()->load(posZ, RP_LEVEL, IMAGE, GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT);
 }
 
@@ -269,15 +275,15 @@
 
   model->setMaterial(material[0]);
+  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back
+  model->setMaterial(material[1]);
+  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,0,5, 7,1,5, 5,2,5, 3,3,5); // front
+  model->setMaterial(material[2]);
+  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,1, 7,1,1, 1,2,1, 0,3,1); // bottom
+  model->setMaterial(material[3]);
   model->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,0,3, 3,1,3, 5,2,3, 4,3,3); // top
-  model->setMaterial(material[1]);
-  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,1, 7,1,1, 1,2,1, 0,3,1); // bottom
-  model->setMaterial(material[2]);
+  model->setMaterial(material[4]);
   model->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,2,2, 5,3,2, 7,0,2, 6,1,2); // left
-  model->setMaterial(material[3]);
+  model->setMaterial(material[5]);
   model->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,0, 1,1,0, 3,2,0, 2,3,0); // right
-  model->setMaterial(material[4]);
-  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,0,5, 7,1,5, 5,2,5, 3,3,5); // front
-  model->setMaterial(material[5]);
-  model->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,0,4, 0,1,4, 2,2,4, 4,3,4); // back
 
   model->finalize();
Index: trunk/src/world_entities/skybox.h
===================================================================
--- trunk/src/world_entities/skybox.h	(revision 7327)
+++ trunk/src/world_entities/skybox.h	(revision 7328)
@@ -16,10 +16,10 @@
 enum SKY_SIDE
 {
-  SKY_TOP = 0,
+  SKY_BACK = 0,
+  SKY_FRONT,
   SKY_BOTTOM,
+  SKY_TOP,
   SKY_LEFT,
   SKY_RIGHT,
-  SKY_FRONT,
-  SKY_BACK
 };
 
@@ -47,9 +47,9 @@
 
   void setTextureAndType(const std::string& name, const std::string& extension);
-  void setTextures(const std::string& top, const std::string& bottom, const std::string& left,
-                   const std::string& right, const std::string& front, const std::string& back);
+  void setTextures(const std::string& negX, const std::string& posX, const std::string& negY,
+                   const std::string& posY, const std::string& negZ, const std::string& posZ);
 
-  void loadCubeMapTextures(const std::string& top, const std::string& bottom, const std::string& left,
-                           const std::string& right, const std::string& front, const std::string& back);
+  void loadCubeMapTextures(const std::string& negX, const std::string& posX, const std::string& negY,
+                           const std::string& posY, const std::string& negZ, const std::string& posZ);
 
   GLuint getTexture(SKY_SIDE side) const { return (this->material[side]) ? this->material[side]->getDiffuseTexture(): 0; };
