Index: code/branches/cegui0.8_ogre1.9/src/modules/designtools/ScreenshotManager.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/designtools/ScreenshotManager.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/designtools/ScreenshotManager.cc	(revision 11795)
@@ -101,5 +101,5 @@
         }
         if(!this->tempTexture_.isNull())
-            this->tempTexture_.freeMethod();
+            this->tempTexture_.setNull();
     }
     
Index: code/branches/cegui0.8_ogre1.9/src/modules/hover/FlagHUD.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/hover/FlagHUD.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/hover/FlagHUD.cc	(revision 11795)
@@ -32,7 +32,11 @@
 #include "FlagHUD.h"
 
-#include <OgreOverlayManager.h>
-#include <OgreMaterialManager.h>
-#include <OgrePanelOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "util/StringUtils.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.cc	(revision 11795)
@@ -31,5 +31,4 @@
 #include <OgreEntity.h>
 #include <OgreBillboardSet.h>
-#include <OgreProgressiveMesh.h>
 
 #include "core/CoreIncludes.h"
@@ -47,7 +46,8 @@
      * @brief Constructor
      */
-    Planet::Planet(Context* context) : MovableEntity(context)
+    Planet::Planet(Context* context) : Model(context)
     {
         RegisterObject(Planet);
+        this->setLodEnabled(false);
         this->registerVariables();
     }
@@ -58,6 +58,4 @@
     Planet::~Planet()
     {
-        if (this->isInitialized() && this->mesh_.getEntity())
-            this->detachOgreObject(this->mesh_.getEntity());
     }
 
@@ -87,62 +85,17 @@
     }
 
-    void Planet::changedMesh()
+    void Planet::changedAtmosphere()
     {
         if( GameMode::showsGraphics() )
         {
-            if (this->mesh_.getEntity())
-                this->detachOgreObject(this->mesh_.getEntity());
-
-            this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
-
-            if (this->mesh_.getEntity())
+            if (this->getMesh().getEntity())
             {
-                this->attachOgreObject(this->mesh_.getEntity());
-                this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
-                this->mesh_.setVisible(this->isVisible());
-
-                float scaleFactor = this->getScale();
-
-#if OGRE_VERSION >= 0x010800
-                Ogre::ProgressiveMesh::LodValueList distList;
-#elif OGRE_VERSION >= 0x010700
-                Ogre::Mesh::LodValueList distList;
-#else
-                Ogre::Mesh::LodDistanceList distList;
-#endif
-
-                distList.push_back(10.0f*scaleFactor);
-                distList.push_back(19.0f*scaleFactor);
-                distList.push_back(27.0f*scaleFactor);
-                distList.push_back(34.0f*scaleFactor);
-                distList.push_back(40.0f*scaleFactor);
-                distList.push_back(45.0f*scaleFactor);
-                distList.push_back(49.0f*scaleFactor);
-                distList.push_back(52.0f*scaleFactor);
-                distList.push_back(54.0f*scaleFactor);
-                distList.push_back(55.0f*scaleFactor);
-
-                float reductionValue = 0.2f;
-
-#if OGRE_VERSION >= 0x010800
-                Ogre::ProgressiveMesh::generateLodLevels(this->mesh_.getEntity()->getMesh().get(), distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL,
-                    reductionValue);
-#else
-                this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
-#endif
-                billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
+                this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
 
                 this->attachOgreObject(this->billboard_.getBillboardSet());
                 this->billboard_.getBillboardSet()->setUseAccurateFacing(true);
-                this->setCastShadows(true);
-                this->billboard_.getBillboardSet()->setRenderQueueGroup(this->mesh_.getEntity()->getRenderQueueGroup());
-                this->mesh_.setCastShadows(true);
+                this->billboard_.getBillboardSet()->setRenderQueueGroup(this->getMesh().getEntity()->getRenderQueueGroup());
             }
         }
-    }
-
-    void Planet::changedShadows()
-    {
-        this->mesh_.setCastShadows(this->bCastShadows_);
     }
 
@@ -154,16 +107,11 @@
         XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);
         XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);
-        XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
-        XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
     }
 
     void Planet::registerVariables()
     {
-        registerVariable(this->atmosphere_, VariableDirection::ToClient);
+        registerVariable(this->atmosphere_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedAtmosphere));
         registerVariable(this->atmosphereSize, VariableDirection::ToClient);
         registerVariable(this->imageSize, VariableDirection::ToClient);
-        // Note: the meshSrc should be synchronised after atmosphere and other values, because the meshSrc callback setts the atmosphere billboards
-        registerVariable(this->meshSrc_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
-        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
     }
 
@@ -171,9 +119,6 @@
     {
         SUPER(Planet, changedVisibility);
-        if (this->isInitialized())
-        {
-            this->mesh_.setVisible(this->isVisible());
-            this->billboard_.setVisible(this->isVisible());
-        }
+
+        this->billboard_.setVisible(this->isVisible());
     }
 }
Index: code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.h	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/objects/Planet.h	(revision 11795)
@@ -40,10 +40,10 @@
 #include <string>
 #include "tools/BillboardSet.h"
-#include "tools/Mesh.h"
-#include "worldentities/MovableEntity.h"
+#include "tools/interfaces/Tickable.h"
+#include "graphics/Model.h"
 
 namespace orxonox
 {
-    class _ObjectsExport Planet : public MovableEntity
+    class _ObjectsExport Planet : public Model, public Tickable
     {
         public:
@@ -58,20 +58,4 @@
             virtual void changedVisibility() override;
 
-            inline void setMeshSource(const std::string& meshname)
-                { this->meshSrc_ = meshname; this->changedMesh(); }
-
-            inline const std::string& getMeshSource() const
-                { return this->meshSrc_; }
-
-            inline void setCastShadows(bool bCastShadows)
-                { this->bCastShadows_ = bCastShadows; this->changedShadows(); }
-
-            inline bool getCastShadows() const
-                { return this->bCastShadows_; }
-
-            inline const std::string& getMesh() const{
-                return this->meshSrc_;
-            }
-
             inline void setAtmosphereSize(float size){
                 this->atmosphereSize = size;
@@ -84,4 +68,5 @@
             inline void setAtmosphere(const std::string& atmosphere){
                 this->atmosphere_ = atmosphere;
+                this->changedAtmosphere();
             }
 
@@ -103,14 +88,10 @@
             void registerVariables();
 
-            void changedMesh();
-            void changedShadows();
+            void changedAtmosphere();
 
-            std::string meshSrc_;
             std::string atmosphere_;
-            Mesh mesh_;
             float atmosphereSize;
             float imageSize;
             BillboardSet billboard_;
-            bool bCastShadows_;
 
     };
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/FadeoutText.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/FadeoutText.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/FadeoutText.cc	(revision 11795)
@@ -29,5 +29,9 @@
 #include "FadeoutText.h"
 
-#include <OgreTextAreaOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#else
+#   include <OgreTextAreaOverlayElement.h>
+#endif
 #include "util/Math.h"
 #include "core/CoreIncludes.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/OverlayText.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/OverlayText.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/OverlayText.cc	(revision 11795)
@@ -29,7 +29,13 @@
 #include "OverlayText.h"
 
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#   include <OgreTextAreaOverlayElement.h>
+#endif
 
 #include "util/StringUtils.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.cc	(revision 11795)
@@ -30,5 +30,10 @@
 
 #include <string>
-#include <OgreTextAreaOverlayElement.h>
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#else
+#   include <OgreTextAreaOverlayElement.h>
+#endif
 
 #include "util/Convert.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.h	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/ChatOverlay.h	(revision 11795)
@@ -33,5 +33,11 @@
 
 #include <list>
-#include <OgreOverlayElement.h>
+
+#include <OgrePrerequisites.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayElement.h>
+#else
+#   include <OgreOverlayElement.h>
+#endif
 
 #include "chat/ChatListener.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.cc	(revision 11795)
@@ -32,9 +32,15 @@
 #include "HUDBar.h"
 
-#include <OgreOverlayManager.h>
 #include <OgreMaterialManager.h>
 #include <OgreTechnique.h>
 #include <OgrePass.h>
-#include <OgrePanelOverlayElement.h>
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "util/Convert.h"
@@ -248,3 +254,13 @@
         return this->icon_->getMaterialName();
     }
+
+    void HUDBar::setIconPosition(Vector2 position)
+    {
+        this->icon_->setPosition(position.x, position.y);
+    }
+
+    void HUDBar::setIconDimensions(Vector2 dimensions)
+    {
+        this->icon_->setDimensions(dimensions.x, dimensions.y);
+    }
 }
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.h	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDBar.h	(revision 11795)
@@ -37,5 +37,4 @@
 #include <map>
 #include <vector>
-#include <OgrePanelOverlayElement.h>
 
 #include "util/Math.h"
@@ -122,8 +121,6 @@
             { return this->currentColour_; }
 
-        inline void setIconPosition(Vector2 position)
-            { this->icon_->setPosition(position.x, position.y); }
-        inline void setIconDimensions(Vector2 dimensions)
-            { this->icon_->setDimensions(dimensions.x, dimensions.y); }
+        void setIconPosition(Vector2 position);
+        void setIconDimensions(Vector2 dimensions);
 
     protected:
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDNavigation.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDNavigation.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDNavigation.cc	(revision 11795)
@@ -32,8 +32,16 @@
 
 #include <OgreCamera.h>
-#include <OgreFontManager.h>
-#include <OgreOverlayManager.h>
-#include <OgreTextAreaOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreFontManager.h>
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgreTextAreaOverlayElement.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreFontManager.h>
+#   include <OgreOverlayManager.h>
+#   include <OgreTextAreaOverlayElement.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include <typeinfo>
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDRadar.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDRadar.cc	(revision 11795)
@@ -31,6 +31,11 @@
 #include "HUDRadar.h"
 
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "util/Math.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.cc	(revision 11795)
@@ -28,4 +28,12 @@
 
 #include "HUDWeapon.h"
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "core/CoreIncludes.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.h	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeapon.h	(revision 11795)
@@ -35,7 +35,4 @@
 #include <vector>
 #include <string>
-
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h> 
 
 #include "overlays/OrxonoxOverlay.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.cc	(revision 11795)
@@ -28,4 +28,12 @@
 
 #include "HUDWeaponMode.h"
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgrePanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgrePanelOverlayElement.h>
+#endif
 
 #include "util/Convert.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/hud/HUDWeaponMode.h	(revision 11795)
@@ -36,7 +36,4 @@
 #include <vector>
 #include <string>
-
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h> 
 
 #include "overlays/OrxonoxOverlay.h"
Index: code/branches/cegui0.8_ogre1.9/src/modules/overlays/stats/Stats.cc
===================================================================
--- code/branches/cegui0.8_ogre1.9/src/modules/overlays/stats/Stats.cc	(revision 11787)
+++ code/branches/cegui0.8_ogre1.9/src/modules/overlays/stats/Stats.cc	(revision 11795)
@@ -30,6 +30,12 @@
 
 #include <string>
-#include <OgreOverlayManager.h>
-#include <OgreBorderPanelOverlayElement.h>
+
+#if OGRE_VERSION >= 0x010900
+#   include <Overlay/OgreOverlayManager.h>
+#   include <Overlay/OgreBorderPanelOverlayElement.h>
+#else
+#   include <OgreOverlayManager.h>
+#   include <OgreBorderPanelOverlayElement.h>
+#endif
 
 #include "util/StringUtils.h"
