Index: /branches/gui/src/lib/graphics/importer/material.h
===================================================================
--- /branches/gui/src/lib/graphics/importer/material.h	(revision 8574)
+++ /branches/gui/src/lib/graphics/importer/material.h	(revision 8575)
@@ -59,5 +59,8 @@
   void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D);
   void setBump(const std::string& bump);
-  GLuint getDiffuseTexture(unsigned int i = 0) const { return (this->textures.size() > i)? this->textures[i].getTexture() : 0; };
+
+  GLuint diffuseTextureID(unsigned int i = 0) const { return (this->textures.size() > i)? this->textures[i].getTexture() : 0; };
+
+  const Texture& diffuseTexture(unsigned int i = 0) const { return this->textures[i]; };
 
   static void addTexturePath(const std::string& pathName);
Index: /branches/gui/src/lib/gui/gl/glgui_style.cc
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_style.cc	(revision 8574)
+++ /branches/gui/src/lib/gui/gl/glgui_style.cc	(revision 8575)
@@ -282,5 +282,5 @@
   void GLGuiStyle::setBackgroundColor(const Color& color, OrxGui::State state)
   {
-    _style[state]._backgroundColor = color;
+    _style[state]._background.setDiffuseColor(color);
   }
 
@@ -320,5 +320,5 @@
   void GLGuiStyle::setBackgroundTexture(const Texture& texture, OrxGui::State state)
   {
-    _style[state]._backgroundTexture = texture;
+    _style[state]._background.setDiffuseMap(texture);
   }
 
@@ -355,5 +355,5 @@
   void GLGuiStyle::setForegroundColor(const Color& color, OrxGui::State state)
   {
-    _style[state]._foregroundColor = color;
+    _style[state]._foreground.setDiffuseColor(color);
   }
 
Index: /branches/gui/src/lib/gui/gl/glgui_style.h
===================================================================
--- /branches/gui/src/lib/gui/gl/glgui_style.h	(revision 8574)
+++ /branches/gui/src/lib/gui/gl/glgui_style.h	(revision 8575)
@@ -11,4 +11,5 @@
 #include "glgui_defs.h"
 
+#include "material.h"
 #include "font.h"
 #include "texture.h"
@@ -34,12 +35,13 @@
     /** @returns bottom borderWidth @param state the State to retrieve from */
     inline float borderBottom(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._borderBottom; }
+
     /** @returns textSize @param state the State to retrieve from */
     inline float textSize(OrxGui::State state = GLGUI_DEFAULT_STYLE) const { return _style[state]._textSize; }
     /** @returns the Background Color @param state the State to retrieve from */
-    inline const Color& backgroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._backgroundColor; }
+    inline const Color& backgroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._background.diffuseColor(); }
     /** @returns background Texture. @param state the State to retrieve from */
-    inline const Texture& backgrorundTexture(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._backgroundTexture; }
+    inline const Texture& backgrorundTexture(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._background.diffuseTexture(); }
     /** @returns the foreground Color @param state the State to retrieve from */
-    inline const Color& foregroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._foregroundColor; }
+    inline const Color& foregroundColor(OrxGui::State state= GLGUI_DEFAULT_STYLE) const { return _style[state]._foreground.diffuseColor(); }
 
     /** @returns FeaturePosition */
@@ -113,8 +115,7 @@
       float             _textSize;             //!< The TextSize of the Widget.
 
-      Color             _backgroundColor;      //!< The BackgroundColor of the Widget.
-      Texture           _backgroundTexture;    //!< The BackgroundTexture of the Widget.
+      Material          _background;           //!< The Background Material of the Widget.
 
-      Color             _foregroundColor;      //!< The foregroundColor of the Widget.
+      Material          _foreground;           //!< The foreground Material of the Widget.
     }
     StatedStyle;
Index: /branches/gui/src/world_entities/environments/mapped_water.cc
===================================================================
--- /branches/gui/src/world_entities/environments/mapped_water.cc	(revision 8574)
+++ /branches/gui/src/world_entities/environments/mapped_water.cc	(revision 8575)
@@ -80,5 +80,5 @@
   memset(pTextureReflection, 0, this->textureSize * this->textureSize * channels * sizeof(unsigned int));
   //mat.select();
-  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0));
+  glBindTexture(GL_TEXTURE_2D, this->mat.diffuseTextureID(0));
   glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
   glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
@@ -90,5 +90,5 @@
   unsigned int* pTextureRefraction = new unsigned int [this->textureSize * this->textureSize * channels];
   memset(pTextureRefraction, 0, this->textureSize * this->textureSize * channels * sizeof(unsigned int));
-  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(1));
+  glBindTexture(GL_TEXTURE_2D, this->mat.diffuseTextureID(1));
   glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
   glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
@@ -281,5 +281,5 @@
   ///
 
-  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(0));
+  glBindTexture(GL_TEXTURE_2D, this->mat.diffuseTextureID(0));
 
   // Create the texture and store it on the video card
@@ -351,5 +351,5 @@
   if(pos.y > waterHeight)
   {
-    double plane[4] = {0.0, -1.0, 0.0, waterHeight}; 
+    double plane[4] = {0.0, -1.0, 0.0, waterHeight};
     glClipPlane(GL_CLIP_PLANE0, plane);
 
@@ -359,5 +359,5 @@
   {
     glCullFace(GL_FRONT);
-    double plane[4] = {0.0, 1.0, 0.0, -waterHeight}; 
+    double plane[4] = {0.0, 1.0, 0.0, -waterHeight};
     glClipPlane(GL_CLIP_PLANE0, plane);
   }
@@ -370,5 +370,5 @@
 
 
-  glBindTexture(GL_TEXTURE_2D, this->mat.getDiffuseTexture(1));
+  glBindTexture(GL_TEXTURE_2D, this->mat.diffuseTextureID(1));
 
   // Create the texture and store it on the video card
Index: /branches/gui/src/world_entities/skybox.h
===================================================================
--- /branches/gui/src/world_entities/skybox.h	(revision 8574)
+++ /branches/gui/src/world_entities/skybox.h	(revision 8575)
@@ -53,5 +53,5 @@
                            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; };
+  GLuint getTexture(SKY_SIDE side) const { return (this->material[side]) ? this->material[side]->diffuseTextureID(): 0; };
 
   static void enableCubeMap();
@@ -69,5 +69,5 @@
   float           textureSize;     //!< this is the length of a texture (assumes a square texture)
   std::string     textureName;     //!< Name of the Texture
-  
+
   int textureName_handle;          //!< used to notify about changes of textureName
   int size_handle;                 //!< used to notify about changes of size
