Index: branches/gui/src/lib/gui/gl/glgui_bar.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_bar.cc	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_bar.cc	(revision 8378)
@@ -46,5 +46,5 @@
     this->setClassID(CL_GLGUI_BAR, "GLGuiBar");
 
-    this->frontMaterial().setDiffuse(1,1,1);
+    this->frontColor().setColor(1,1,1);
 
     this->setSize2D(50, 10);
@@ -64,5 +64,5 @@
     GLGuiWidget::draw();
 
-    this->frontMaterial().select();
+    //this->frontMaterial().select();
     glBegin(GL_QUADS);
 
Index: branches/gui/src/lib/gui/gl/glgui_button.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_button.cc	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_button.cc	(revision 8378)
@@ -55,5 +55,5 @@
 
     this->_label.setFont("fonts/final_frontier.ttf", 20);
-    this->frontMaterial().setDiffuse(1, 0, 0);
+    this->frontColor().setColor(1, 0, 0, 1.0);
 
     this->_label.setParent2D(this);
Index: branches/gui/src/lib/gui/gl/glgui_checkbutton.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_checkbutton.cc	(revision 8378)
@@ -68,6 +68,6 @@
     this->setSize2D(this->labelText().getSizeX2D() + 30 + borderLeft() + borderRight(), this->labelText().getSizeY2D() + 10 + borderTop()+borderBottom());
     GLGuiWidget::resize();
-    this->frontRect().setTopLeft(borderLeft(), borderTop());
-    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()) , this->getSizeY2D() - (borderTop() + borderBottom()));
+/*    this->frontRect().setTopLeft(borderLeft(), borderTop());
+    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()) , this->getSizeY2D() - (borderTop() + borderBottom()));*/
   }
 
@@ -89,6 +89,6 @@
     GLGuiButton::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
+//     this->frontMaterial().select();
+//     this->drawRect(this->frontRect());
 
     if (this->bActive)
Index: branches/gui/src/lib/gui/gl/glgui_image.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_image.cc	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_image.cc	(revision 8378)
@@ -45,6 +45,6 @@
     this->setClassID(CL_GLGUI_IMAGE, "GLGuiImage");
 
-    this->frontMaterial().setDiffuseMap(this->texture);
-    this->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+//     this->frontMaterial().setDiffuseMap(this->texture);
+//     this->frontMaterial().setBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
     this->resize();
@@ -54,6 +54,6 @@
   void GLGuiImage::loadImageFromTexture(const Texture& texture)
   {
-    this->frontMaterial().setDiffuseMap(texture);
-    this->frontMaterial().setDiffuse(1,1,1);
+/*    this->frontMaterial().setDiffuseMap(texture);
+    this->frontMaterial().setDiffuse(1,1,1);*/
   }
 
@@ -75,6 +75,6 @@
   void GLGuiImage::resize()
   {
-    this->frontRect().setTopLeft(this->borderLeft(), this->borderTop());
-    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()) );
+/*    this->frontRect().setTopLeft(this->borderLeft(), this->borderTop());
+    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()) );*/
     GLGuiWidget::resize();
   }
@@ -89,6 +89,6 @@
     GLGuiWidget::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
+/*    this->frontMaterial().select();*/
+/*    this->drawRect(this->frontRect());*/
     this->endDraw();
   }
Index: branches/gui/src/lib/gui/gl/glgui_inputline.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_inputline.cc	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_inputline.cc	(revision 8378)
@@ -167,6 +167,6 @@
     this->setSize2D( this->text.getSize2D() + Vector2D(borderLeft() + borderRight() + 4.0, borderTop() + borderBottom() + 4.0));
     GLGuiWidget::resize();
-    this->frontRect().setTopLeft(borderLeft(), borderTop());
-    this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));
+/*    this->frontRect().setTopLeft(borderLeft(), borderTop());
+    this->frontRect().setSize(this->getSize2D() - Vector2D(borderLeft() + borderRight(), borderTop() + borderBottom()));*/
   }
 
@@ -218,6 +218,6 @@
     GLGuiWidget::draw();
 
-    this->frontMaterial().select();
-    GLGuiWidget::drawRect(this->frontRect());
+//     this->frontMaterial().select();
+//     GLGuiWidget::drawRect(this->frontRect());
 
     this->endDraw();
Index: branches/gui/src/lib/gui/gl/glgui_pushbutton.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_pushbutton.cc	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_pushbutton.cc	(revision 8378)
@@ -49,6 +49,6 @@
 
     GLGuiWidget::resize();
-    this->frontRect().setTopLeft(borderLeft(), borderTop());
-    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()));
+/*    this->frontRect().setTopLeft(borderLeft(), borderTop());
+    this->frontRect().setSize(this->getSizeX2D() - (borderLeft() + borderRight()), this->getSizeY2D() - (borderTop() + borderBottom()));*/
   }
 
@@ -97,6 +97,4 @@
     GLGuiButton::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
     this->endDraw();
     //   this->label->draw();
Index: branches/gui/src/lib/gui/gl/glgui_slider.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_slider.cc	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_slider.cc	(revision 8378)
@@ -161,6 +161,6 @@
   {
     GLGuiWidget::resize();
-    this->frontRect().setTopLeft(this->borderLeft(), this->getSizeY2D()/2.0 - 2.0);
-    this->frontRect().setSize(this->getSizeX2D() - borderLeft() - borderRight(), 4.0);
+/*    this->frontRect().setTopLeft(this->borderLeft(), this->getSizeY2D()/2.0 - 2.0);
+    this->frontRect().setSize(this->getSizeX2D() - borderLeft() - borderRight(), 4.0);*/
   }
 
@@ -228,6 +228,6 @@
     GLGuiWidget::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
+    //this->frontMaterial().select();
+//     this->drawRect(this->frontRect());
 
     this->drawRect(Rect2D(this->sliderPosition()-_sliderWidth/2.0, 0*this->borderTop(), _sliderWidth, this->getSizeY2D() - (borderTop() + borderBottom()) ));
Index: branches/gui/src/lib/gui/gl/glgui_textfield.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_textfield.cc	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_textfield.cc	(revision 8378)
@@ -53,6 +53,6 @@
     GLGuiWidget::draw();
 
-    this->frontMaterial().select();
-    this->drawRect(this->frontRect());
+/*    this->frontMaterial().select();
+    this->drawRect(this->frontRect());*/
     this->endDraw();
   }
Index: branches/gui/src/lib/gui/gl/glgui_widget.cc
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_widget.cc	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_widget.cc	(revision 8378)
@@ -67,5 +67,5 @@
 
     this->_backMat.setDiffuse(1.0, 1.0, 1.0);
-    this->_frontMat.setDiffuse(1.0, 0.0, 0.0);
+    this->_frontColor.setColor(1.0, 0.0, 0.0);
 
     this->_borderLeft = 1.0;
@@ -176,5 +176,5 @@
   void GLGuiWidget::clicking(const Vector2D& pos)
   {
-    this->frontMaterial().setDiffuse(0, 0, 1);
+    this->frontColor().setColor(0, 0, 1);
 
   }
@@ -182,5 +182,5 @@
   void GLGuiWidget::releasing(const Vector2D& pos)
   {
-    this->frontMaterial().setDiffuse(0,1,0);
+    this->frontColor().setColor(0,1,0);
 
   }
@@ -188,10 +188,10 @@
   void GLGuiWidget::receivedFocus()
   {
-    this->frontMaterial().setDiffuse(0, 1, 0);
+    this->frontColor().setColor(0, 1, 0);
   }
 
   void GLGuiWidget::removedFocus()
   {
-    this->frontMaterial().setDiffuse(1, 0, 0);
+    this->frontColor().setColor(1, 0, 0);
 
   }
Index: branches/gui/src/lib/gui/gl/glgui_widget.h
===================================================================
--- branches/gui/src/lib/gui/gl/glgui_widget.h	(revision 8377)
+++ branches/gui/src/lib/gui/gl/glgui_widget.h	(revision 8378)
@@ -92,8 +92,6 @@
     const Rect2D& backRect() const { return this->_backRect; };
 
-    Material& frontMaterial() { return this->_frontMat; };
-    const Material& frontMaterial() const { return this->_frontMat; };
-    Rect2D& frontRect() { return this->_frontRect; };
-    const Rect2D& frontRect() const { return this->_frontRect; };
+    Color& frontColor() { return this->_frontColor; };
+    const Color& frontColor() const { return this->_frontColor; };
 
     /** @brief sets all borders to the same value. */
@@ -162,6 +160,5 @@
     Rect2D                         _backRect;
 
-    Material                       _frontMat;
-    Rect2D                         _frontRect;
+    Color                          _frontColor;
 
     float                          _borderLeft;
Index: branches/gui/src/lib/util/color.h
===================================================================
--- branches/gui/src/lib/util/color.h	(revision 8377)
+++ branches/gui/src/lib/util/color.h	(revision 8378)
@@ -16,18 +16,20 @@
 {
 public:
-  Color(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 0.0f) { _rgba[0] = r; _rgba[1] = g; _rgba[2] = b; _rgba[3] = a; };
+  Color(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 1.0f) { _rgba[0] = r; _rgba[1] = g; _rgba[2] = b; _rgba[3] = a; };
   Color(const Color& c) { _rgba[0] = c.r(); _rgba[1] = c.g(); _rgba[2] = c.b(); _rgba[3] = c.a(); }
 
-  float& operator[](unsigned int i) { return _rgba[i]; }
-  const float& operator[](unsigned int i) const { return _rgba[i]; }
+  inline float& operator[](unsigned int i) { return _rgba[i]; }
+  inline const float& operator[](unsigned int i) const { return _rgba[i]; }
 
-  float r() const { return _rgba[0]; }
-  float& r() { return _rgba[0]; }
-  float g() const { return _rgba[1]; }
-  float& g() { return _rgba[1]; }
-  float b() const { return _rgba[2]; }
-  float& b() { return _rgba[2]; }
-  float a() const { return _rgba[3]; }
-  float& a() { return _rgba[3]; }
+  inline float r() const { return _rgba[0]; }
+  inline float& r() { return _rgba[0]; }
+  inline float g() const { return _rgba[1]; }
+  inline float& g() { return _rgba[1]; }
+  inline float b() const { return _rgba[2]; }
+  inline float& b() { return _rgba[2]; }
+  inline float a() const { return _rgba[3]; }
+  inline float& a() { return _rgba[3]; }
+
+  void setColor(float r = 0.0f, float g = 0.0f, float b = 0.0f, float a = 1.0f) { _rgba[0] = r; _rgba[1] = g; _rgba[2] = b; _rgba[3] = a; };
 
 
