rpms/ember/devel ember-0.5.4-ogre16.patch, NONE, 1.1 ember.spec, 1.1, 1.2

Alexey Torkhov atorkhov at fedoraproject.org
Thu Oct 2 18:29:01 UTC 2008


Author: atorkhov

Update of /cvs/pkgs/rpms/ember/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10841

Modified Files:
	ember.spec 
Added Files:
	ember-0.5.4-ogre16.patch 
Log Message:
* Thu Oct 02 2008 Alexey Torkhov <atorkhov at gmail.com> 0.5.4-2
- Update for new OGRE


ember-0.5.4-ogre16.patch:

--- NEW FILE ember-0.5.4-ogre16.patch ---
diff --git a/configure.ac b/configure.ac
index 3d1924f..b277692 100644
--- a/configure.ac
+++ b/configure.ac
@@ -255,7 +255,7 @@ config.log to see why the tests failed, and fix it.])
 	])
 
 # Check for OGRE
-OGRE_VERSION=1.4.2
+OGRE_VERSION=1.6.0
 PKG_CHECK_MODULES(OGRE, [OGRE >= $OGRE_VERSION CEGUI-OGRE >= $OGRE_VERSION],
 	[
 		CXXFLAGS="$CXXFLAGS $OGRE_CFLAGS"
@@ -269,8 +269,6 @@ Please goto http://www.ogre3d.org to get the latest, or check config.log to
 see why the tests failed, and fix it.])
 	])
 
-AC_DEFINE(OGRE_DEBUG_MEMORY_MANAGER, 0, [disable Ogre memory manager])
-
 if test "$freeimage_check" = "true"; then 
 	AC_CHECK_DECLS(OGRE_NO_FREEIMAGE
 	, , [AC_MSG_ERROR([You've compiled Ogre with FreeImage support. Due to the way FreeImage includes its own versions of common image libraries such as libpng this will clash with other system libs such as DevIL, leading to random crashes. Please compile Ogre with FreeImage disabled (by using the --disable-freeimage configure switch). Ogre will then use DevIL instead.])]
diff --git a/src/components/ogre/AvatarCamera.cpp b/src/components/ogre/AvatarCamera.cpp
index 73f8f02..c2aff67 100644
--- a/src/components/ogre/AvatarCamera.cpp
+++ b/src/components/ogre/AvatarCamera.cpp
@@ -255,7 +255,7 @@ void AvatarCamera::attach(Ogre::SceneNode* toNode) {
 	mAvatarCameraNode->setOrientation(Ogre::Quaternion::IDENTITY);
 	mAvatarCameraNode->_update(true, true);
 	std::stringstream ss;
-	ss << "Attached camera to node: " << toNode->getName() <<". New position: " << mCamera.getWorldPosition() << " New orientation: " << mCamera.getWorldOrientation();
+	ss << "Attached camera to node: " << toNode->getName() <<". New position: " << mCamera.getDerivedPosition() << " New orientation: " << mCamera.getDerivedOrientation();
 	S_LOG_VERBOSE(ss.str());
 }
 
@@ -459,7 +459,7 @@ void AvatarCamera::pickInWorld(Ogre::Real mouseX, Ogre::Real mouseY, const Mouse
 		if (direction.z != 0) {
 		
 			mAdjustTerrainRay.setDirection(direction);
-			mAdjustTerrainRay.setOrigin(mAvatarCameraRootNode->getWorldPosition());
+			mAdjustTerrainRay.setOrigin(mAvatarCameraRootNode->_getDerivedPosition());
 			
  			mAdjustTerrainRaySceneQuery->setRay(mAdjustTerrainRay);
 			
@@ -472,7 +472,7 @@ void AvatarCamera::pickInWorld(Ogre::Real mouseX, Ogre::Real mouseY, const Mouse
 				
 				if (entry.worldFragment) {
 					Ogre::Vector3 position = entry.worldFragment->singleIntersection;
-					Ogre::Real distance = mAvatarCameraRootNode->getWorldPosition().distance(position);
+					Ogre::Real distance = mAvatarCameraRootNode->_getDerivedPosition().distance(position);
 					if (distance < mWantedCameraDistance) {
 						_setCameraDistance(distance - 0.1);
 						return true;
diff --git a/src/components/ogre/AvatarController.cpp b/src/components/ogre/AvatarController.cpp
index a9bb118..a00c239 100644
--- a/src/components/ogre/AvatarController.cpp
+++ b/src/components/ogre/AvatarController.cpp
@@ -230,7 +230,7 @@ bool AvatarController::frameStarted(const Ogre::FrameEvent& event)
 	if (mDecalObject)
 	{
 		///hide the decal when we're close to it
-		if (mDecalNode->getWorldPosition().distance(mAvatar.getAvatarSceneNode()->getWorldPosition()) < 1) {
+		if (mDecalNode->_getDerivedPosition().distance(mAvatar.getAvatarSceneNode()->_getDerivedPosition()) < 1) {
 			mDecalNode->setVisible(false);
 		}
 	}
diff --git a/src/components/ogre/EmberEntity.cpp b/src/components/ogre/EmberEntity.cpp
index b7ae1a3..710b3f7 100644
--- a/src/components/ogre/EmberEntity.cpp
+++ b/src/components/ogre/EmberEntity.cpp
@@ -69,17 +69,6 @@ namespace Ogre {
 		{
 			SimpleRenderable::getWorldTransforms(xform);
 		}
-		//-----------------------------------------------------------------------
-		const Quaternion& getWorldOrientation(void) const
-		{
-			return SimpleRenderable::getWorldOrientation();
-		}
-		//-----------------------------------------------------------------------
-		const Vector3& getWorldPosition(void) const
-		{
-			return SimpleRenderable::getWorldPosition();
-		}				
-
 	};
 
 };
@@ -451,7 +440,7 @@ void EmberEntity::onLocationChanged(Eris::Entity *oldLocation)
 	detachFromModel();
 
 	///Before we detach ourselves from our current parent, we need to record our current position in the world. This will come in handy later on when we need to determine if we actually moved in the world space.
-	const Ogre::Vector3 oldWorldPosition = getSceneNode()->getWorldPosition();
+	const Ogre::Vector3 oldWorldPosition = getSceneNode()->_getDerivedPosition();
 	
 	///Get the new location. We use getEmberLocation() since we always know that all entities are of type EmberEntity.
 	EmberEntity* newLocationEntity = getEmberLocation();
@@ -488,7 +477,7 @@ void EmberEntity::onLocationChanged(Eris::Entity *oldLocation)
 		///since else we'll get a "gap" when we're waiting on updated positions from the server
 		///this isn't optimal
 		if (isMoving()) {
-			const Ogre::Vector3& newWorldPosition = getSceneNode()->getWorldPosition();
+			const Ogre::Vector3& newWorldPosition = getSceneNode()->_getDerivedPosition();
 			getSceneNode()->translate(oldWorldPosition - newWorldPosition);
 		}
 	}
diff --git a/src/components/ogre/EmberOgre.cpp b/src/components/ogre/EmberOgre.cpp
index daaaf9d..6ef41b4 100644
--- a/src/components/ogre/EmberOgre.cpp
+++ b/src/components/ogre/EmberOgre.cpp
@@ -293,9 +293,9 @@ bool EmberOgre::renderOneFrame()
 {
 	Ember::Input& input(Ember::Input::getSingleton());
 	input.processInput();
-	if (input.isApplicationVisible()) {
-		return mRoot->renderOneFrame();
-	}
+ 	if (input.isApplicationVisible()) {
+		mRoot->renderOneFrame();
+ 	}
 	return true;
 }
 
diff --git a/src/components/ogre/EmberOgreFileSystem.cpp b/src/components/ogre/EmberOgreFileSystem.cpp
index b4eaf38..aaa5b54 100644
--- a/src/components/ogre/EmberOgreFileSystem.cpp
+++ b/src/components/ogre/EmberOgreFileSystem.cpp
@@ -448,6 +448,24 @@ namespace EmberOgre {
 
 		return ret;
 	}
+	
+	time_t FileSystemArchive::getModifiedTime(const String& filename)
+	{
+		String full_path = concatenate_path(mName, filename);
+
+		struct stat tagStat;
+		bool ret = (stat(full_path.c_str(), &tagStat) == 0);
+
+		if (ret)
+		{
+			return tagStat.st_mtime;
+		}
+		else
+		{
+			return 0;
+		}
+
+	}	
     //-----------------------------------------------------------------------
     const String& FileSystemArchiveFactory::getType(void) const
     {
diff --git a/src/components/ogre/EmberOgreFileSystem.h b/src/components/ogre/EmberOgreFileSystem.h
index 5bbbf78..051d00f 100644
--- a/src/components/ogre/EmberOgreFileSystem.h
+++ b/src/components/ogre/EmberOgreFileSystem.h
@@ -90,6 +90,11 @@ namespace EmberOgre {
 
         /// @copydoc Archive::exists
         bool exists(const Ogre::String& filename);
+        
+		/**
+		 * @copydoc Ogre::Archive::getModifiedTime
+		 */
+		virtual time_t getModifiedTime(const Ogre::String& filename); 
 
     };
 
diff --git a/src/components/ogre/EntityWorldPickListener.cpp b/src/components/ogre/EntityWorldPickListener.cpp
index 466e026..640b0aa 100644
--- a/src/components/ogre/EntityWorldPickListener.cpp
+++ b/src/components/ogre/EntityWorldPickListener.cpp
@@ -154,10 +154,10 @@ void EntityWorldPickListener::processPickResult(bool& continuePicking, Ogre::Ray
 					result.distance = collisionResult.distance;
 					if (mFurthestPickingDistance == 0) {
 						///test all objects that fall into this distance
-						mFurthestPickingDistance = (pickedMovable->getParentSceneNode()->getWorldPosition() - cameraRay.getOrigin()).length() + pickedMovable->getBoundingRadius();
+						mFurthestPickingDistance = (pickedMovable->getParentSceneNode()->_getDerivedPosition() - cameraRay.getOrigin()).length() + pickedMovable->getBoundingRadius();
 						mResult = result;
 					} else {
-						if ((pickedMovable->getParentSceneNode()->getWorldPosition() - cameraRay.getOrigin()).length() - pickedMovable->getBoundingRadius() > mFurthestPickingDistance) {
+						if ((pickedMovable->getParentSceneNode()->_getDerivedPosition() - cameraRay.getOrigin()).length() - pickedMovable->getBoundingRadius() > mFurthestPickingDistance) {
 							continuePicking = false;		
 						} else {
 							if (result.distance < mResult.distance) {
diff --git a/src/components/ogre/MeshCollisionDetector.cpp b/src/components/ogre/MeshCollisionDetector.cpp
index 1c9026b..c9a4748 100644
--- a/src/components/ogre/MeshCollisionDetector.cpp
+++ b/src/components/ogre/MeshCollisionDetector.cpp
@@ -83,8 +83,8 @@ void MeshCollisionDetector::testCollision(Ogre::Ray& ray, CollisionResult& resul
 	
 			// get the mesh information
 			getMeshInformation(pentity->getMesh(), vertex_count, vertices, index_count, indices,             
-								pentity->getParentNode()->getWorldPosition(),
-								pentity->getParentNode()->getWorldOrientation(),
+								pentity->getParentNode()->_getDerivedPosition(),
+								pentity->getParentNode()->_getDerivedOrientation(),
 								pentity->getParentNode()->getScale());
 	
 			// test for hitting individual triangles on the mesh
diff --git a/src/components/ogre/OgreSetup.cpp b/src/components/ogre/OgreSetup.cpp
index 534a93f..aee317f 100644
--- a/src/components/ogre/OgreSetup.cpp
+++ b/src/components/ogre/OgreSetup.cpp
@@ -289,85 +289,66 @@ bool OgreSetup::configure(void)
 	_controlfp(_RC_NEAR , _MCW_RC);
 #else
 
-	///On *NIX, Ogre can have either a SDL or an GLX backend (or "platform", it's selected at compile time by the --with-platform=[GLX|SDL] option). Ogre 1.2+ uses GLX by default.
-	///However, we use SDL for our input systems. If the SDL backend then is used, everything is already set up for us.
-	///If on the other hand the GLX backend is used, we need to do some fiddling to get SDL to play nice with the GLX render system.
+	/// we start by trying to figure out what kind of resolution the user has selected, and whether full screen should be used or not
+	unsigned int height = 768, width = 1024;
+	bool fullscreen;
 
-	///Check if SDL already has been initalized. If it has, we know that Ogre uses the SDL backend (the call to SDL_Init happens at mRoot->restoreConfig())
-	if(SDL_WasInit(SDL_INIT_VIDEO)==0) {
-		///SDL hasn't been initilized, we thus know that we're using the GLX platform, and need to initialize SDL ourselves
+	parseWindowGeometry(mRoot->getRenderSystem()->getConfigOptions(), width, height, fullscreen);
 
-		/// we start by trying to figure out what kind of resolution the user has selected, and whether full screen should be used or not
-		unsigned int height = 768, width = 1024;
-		bool fullscreen;
+	SDL_Init(SDL_INIT_VIDEO);
 
-		parseWindowGeometry(mRoot->getRenderSystem()->getConfigOptions(), width, height, fullscreen);
+	///this is a failsafe which guarantees that SDL is correctly shut down (returning the screen to correct resolution, releasing mouse etc.) if there's a crash.
+	atexit(SDL_Quit);
+	oldSignals[SIGSEGV] = signal(SIGSEGV, shutdownHandler);
+	oldSignals[SIGABRT] = signal(SIGABRT, shutdownHandler);
+	oldSignals[SIGBUS] = signal(SIGBUS, shutdownHandler);
+	oldSignals[SIGILL] = signal(SIGILL, shutdownHandler);
 
-		SDL_Init(SDL_INIT_VIDEO);
 
+	///set the window size
+//  int flags = SDL_OPENGL | SDL_HWPALETTE | SDL_RESIZABLE | SDL_HWSURFACE;
+// 	int flags = SDL_HWPALETTE | SDL_HWSURFACE | SDL_OPENGL;
+ 	int flags = SDL_OPENGL;
 
+// 	SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+// 	bool useAltSwapControl = SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1) != 0;
 
-		///this is a failsafe which guarantees that SDL is correctly shut down (returning the screen to correct resolution, releasing mouse etc.) if there's a crash.
- 		atexit(SDL_Quit);
- 		oldSignals[SIGSEGV] = signal(SIGSEGV, shutdownHandler);
- 		oldSignals[SIGABRT] = signal(SIGABRT, shutdownHandler);
- 		oldSignals[SIGBUS] = signal(SIGBUS, shutdownHandler);
- 		oldSignals[SIGILL] = signal(SIGILL, shutdownHandler);
-
-
-		///set the window size
-//        int flags = SDL_OPENGL | SDL_HWPALETTE | SDL_RESIZABLE | SDL_HWSURFACE;
-        int flags = SDL_HWPALETTE | SDL_HWSURFACE;
-
-//         SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
-        // request good stencil size if 32-bit colour
+		// request good stencil size if 32-bit colour
 /*        if (colourDepth == 32)
-        {
-            SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 8);
-        }*/
-
-        if (fullscreen)
-            flags |= SDL_FULLSCREEN;
-
-		mMainVideoSurface = SDL_SetVideoMode(width, height,0, flags); // create an SDL window
-
-		SDL_WM_SetCaption("Ember","ember");
+		{
+			SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 8);
+		}*/
 
-		SDL_SysWMinfo info;
-		SDL_VERSION(&info.version);
+	if (fullscreen) {
+		flags |= SDL_FULLSCREEN;
+	}
 
-		SDL_GetWMInfo(&info);
+	mMainVideoSurface = SDL_SetVideoMode(width, height, 0, flags); // create an SDL window
 
-		std::string dsp(&(DisplayString(info.info.x11.display)[1]));
-		std::vector<Ogre::String> tokens = Ogre::StringUtil::split(dsp, ".");
+	SDL_WM_SetCaption("Ember","ember");
 
-		Ogre::NameValuePairList misc;
-		std::string s = Ogre::StringConverter::toString((long)info.info.x11.display);
-		s += ":" + tokens[1] +":";
-		s += ":" + Ogre::StringConverter::toString((long)info.info.x11.window);
-		misc["parentWindowHandle"] = s;
+	Ogre::NameValuePairList misc;
 
-		//misc["externalGLControl"] = "true";
+// 	misc["externalGLControl"] = Ogre::String("True");
+	misc["currentGLContext"] = Ogre::String("True");
+// 	misc["vsync"] = Ogre::String("No");
+	
 
-/*		GLXContext glxContext(glXGetCurrentContext());
-		GLXDrawable glxDrawable(glXGetCurrentDrawable());
-		std::string glxContextString = Ogre::StringConverter::toString((long)glxContext);
-		glxContextString += ":" + Ogre::StringConverter::toString((long)glxDrawable);
-		misc["glxcontext"] = glxContextString;*/
 
-		/// initialise root, without creating a window
-		mRoot->initialise(false);
+	/// initialise root, without creating a window
+	mRoot->initialise(false);
 
-		mRenderWindow = mRoot->createRenderWindow("MainWindow", width, height, true, &misc);
+	mRenderWindow = mRoot->createRenderWindow("MainWindow", width, height, false, &misc);
 
-		///we need to set the window to be active by ourselves, since GLX by default sets it to false, but then activates it upon receiving some X event (which it will never recieve since we'll use SDL).
-		///see OgreGLXWindow.cpp
-		mRenderWindow->setActive(true);
-		mRenderWindow->setAutoUpdated(true);
+	///we need to set the window to be active and visible by ourselves, since GLX by default sets it to false, but then activates it upon receiving some X event (which it will never recieve since we'll use SDL).
+	///see OgreGLXWindow.cpp
+	mRenderWindow->setActive(true);
+	mRenderWindow->setAutoUpdated(true);
+	mRenderWindow->setVisible(true);
+	
+	
+// 	mRoot->addFrameListener(this);
 
-	} else {
-		mRenderWindow = mRoot->initialise(true, "Ember");
-	}
 
 
     ///set the icon of the window
@@ -815,5 +796,12 @@ void OgreSetup::parseWindowGeometry(Ogre::ConfigOptionMap& config, unsigned int&
 
 }
 
+bool OgreSetup::frameEnded(const Ogre::FrameEvent & evt)
+{
+	SDL_GL_SwapBuffers();
+	
+	return true;
+}
+
 
 }
diff --git a/src/components/ogre/OgreSetup.h b/src/components/ogre/OgreSetup.h
index 8ec713b..6690026 100644
--- a/src/components/ogre/OgreSetup.h
+++ b/src/components/ogre/OgreSetup.h
@@ -40,7 +40,8 @@ class EmberPagingSceneManagerFactory;
 	A class used for setting up Ogre. Instead of creating the Ogre root object and the main render window direclty, use this to guarantee that everything is set up correctly.
 	@author Erik Hjortsberg <erik at katastrof.nu>
 */
-class OgreSetup{
+class OgreSetup : Ogre::FrameListener
+{
 public:
     OgreSetup();
 
@@ -82,6 +83,8 @@ public:
      */
     void shutdown();
     
+	bool frameEnded(const Ogre::FrameEvent & evt);
+
 private:
 
 	/**
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapeMeshDecal.h b/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapeMeshDecal.h
index 777bcbf..984b44d 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapeMeshDecal.h
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapeMeshDecal.h
@@ -112,6 +112,11 @@ namespace Ogre
 		void SetSize( const Vector2& size );
 		
 		virtual void _notifyAttached(Node* parent, bool isTagPoint = false);
+		
+		/**
+		* @copydoc MovableObject::visitRenderables
+		*/
+		virtual void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables = false);
 	private:
 		void CreateGeometry();
 		size_t GetNumVertices() const;
@@ -133,6 +138,7 @@ namespace Ogre
 										  const bool omitFirstTri,
 										  const bool omitLastTri, 
 										  const int indexOffset );
+	protected:
 		// From MovableObject
 		const String& getMovableType() const 
 		{
@@ -155,9 +161,7 @@ namespace Ogre
 		}
 		virtual void getRenderOperation( RenderOperation& op );
 		virtual void getWorldTransforms( Matrix4* xform ) const;
-		const Quaternion& getWorldOrientation() const;
-		const Vector3& getWorldPosition() const;
-		Real getSquaredViewDepth( const Camera* cam ) const;
+		virtual Real getSquaredViewDepth( const Camera* cam ) const;
 		const LightList& getLights() const
 		{
 			return lightList_;
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapePageRenderable.h b/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapePageRenderable.h
index d9567d1..8169e8b 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapePageRenderable.h
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapePageRenderable.h
@@ -109,6 +109,10 @@ namespace Ogre
 		    /// @see MovableObject
 		    uint32 getTypeFlags(void) const;
 
+			/**
+			 * @copydoc MovableObject::visitRenderables
+			 */
+			virtual void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables = false);
         protected:
             
            PagingLandScapePageManager *mParent;
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapeRenderable.h b/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapeRenderable.h
index 2f3db7e..828ca2d 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapeRenderable.h
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/include/OgrePagingLandScapeRenderable.h
@@ -177,6 +177,10 @@ namespace Ogre
 		*/
 		bool frameStarted(const Ogre::FrameEvent& event);
         
+		/**
+			* @copydoc MovableObject::visitRenderables
+			*/
+		virtual void visitRenderables(Renderable::Visitor* visitor, bool debugRenderables = false);
 
 
 	protected:	
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeMeshDecal.cpp b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeMeshDecal.cpp
index b740ea1..dfc0295 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeMeshDecal.cpp
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeMeshDecal.cpp
@@ -478,7 +478,7 @@ void PagingLandScapeMeshDecal::_updateRenderQueue( RenderQueue* queue )
 void PagingLandScapeMeshDecal::getRenderOperation( Ogre::RenderOperation& op )
 {
 	// Update our RenderOperation if necessary.
-	const Vector3& position = mParentNode->getWorldPosition();
+	const Vector3& position = mParentNode->_getDerivedPosition();
 	const Quaternion& orientation = mParentNode->getOrientation();
 	if( position != position_ ||
 		orientation != orientation_ )
@@ -498,19 +498,9 @@ void PagingLandScapeMeshDecal::getWorldTransforms( Ogre::Matrix4* xform ) const
 	*xform = mParentNode->_getFullTransform();
 }
 
-const Quaternion& PagingLandScapeMeshDecal::getWorldOrientation() const
-{
-	return mParentNode->_getDerivedOrientation();
-}
-
-const Vector3& PagingLandScapeMeshDecal::getWorldPosition() const
-{
-	return mParentNode->getWorldPosition();
-}
-
 Real PagingLandScapeMeshDecal::getSquaredViewDepth( const Camera* cam ) const
 {
-    return ( getWorldPosition() - cam->getDerivedPosition() ).squaredLength();
+    return ( mParentNode->_getDerivedPosition() - cam->getDerivedPosition() ).squaredLength();
 }
  
 // Receive terrain vertices from our query.
@@ -587,6 +577,11 @@ bool PagingLandScapeMeshDecal::queryResult(SceneQuery::WorldFragment* fragment)
 	return true;
 }
 
+
+void PagingLandScapeMeshDecal::visitRenderables(Renderable::Visitor* visitor, bool debugRenderables)
+{
+	visitor->visit(this, 0, debugRenderables);
+}
 //-----------------------------------------------------------------------
 String PagingLandScapeMeshDecalFactory::FACTORY_TYPE_NAME = "PagingLandScapeMeshDecal";
 
@@ -657,3 +652,4 @@ void PagingLandScapeMeshDecalFactory::destroyInstance( MovableObject* obj )
 {
 	delete obj;
 }
+
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeOcclusion.cpp b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeOcclusion.cpp
index 39a873a..1079cdc 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeOcclusion.cpp
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeOcclusion.cpp
@@ -50,7 +50,7 @@ namespace Ogre
         {
             mCurrentCam = cam;
         }
-        if  (mCurrentCam->nextFrame(Root::getSingleton().getCurrentFrameNumber ()))
+        if  (mCurrentCam->nextFrame(Root::getSingleton().getNextFrameNumber()))
         {              
             // change frame Id counter 
             //that identify current frame.
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeOptions.cpp b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeOptions.cpp
index 9a93a7f..23b4983 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeOptions.cpp
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeOptions.cpp
@@ -218,11 +218,11 @@ namespace Ogre
             if (renderer)
             {
                 const RenderSystemCapabilities* caps = renderer->getCapabilities();
-				hasVertexShader = caps->hasCapability(RSC_VERTEX_PROGRAM) && !(StringUtil::startsWith(caps->getMaxFragmentProgramVersion (), "vs_1_0", true));
-				hasVertexShader = caps->hasCapability(RSC_BLENDING) && !(StringUtil::startsWith(caps->getMaxFragmentProgramVersion (), "vs_1_0", true));
+				hasVertexShader = caps->hasCapability(RSC_VERTEX_PROGRAM) && caps->isShaderProfileSupported ("vs_1_0");
+				hasVertexShader = caps->hasCapability(RSC_BLENDING) && caps->isShaderProfileSupported("vs_1_0");
                 hasFragmentShader = caps->hasCapability(RSC_FRAGMENT_PROGRAM);
-                const String &maxShaderVersion = caps->getMaxFragmentProgramVersion ();
-                hasFragmentShader2 = hasFragmentShader && !(maxShaderVersion == "ps_1_1" || maxShaderVersion == "ps_1_0");
+//                 const String &maxShaderVersion = caps->getMaxFragmentProgramVersion ();
+                hasFragmentShader2 = hasFragmentShader && caps->isShaderProfileSupported("ps_1_1") && caps->isShaderProfileSupported("ps_1_0");
                 numTextureUnits = caps->getNumTextureUnits ();
                 isRenderGL = StringUtil::startsWith(renderer->getName(), "OpenGL", false);
                 isInit = true;
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapePageRenderable.cpp b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapePageRenderable.cpp
index b847aa6..eb0d820 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapePageRenderable.cpp
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapePageRenderable.cpp
@@ -225,7 +225,7 @@ namespace Ogre
                            0.0f + Numtiles * scale_z);
 
         assert (mParentNode);
-        mCenter = mBounds.getCenter()  + mParentNode->getWorldPosition();
+        mCenter = mBounds.getCenter()  + mParentNode->_getDerivedPosition();
 	    mWorldBoundingSphere.setCenter(mCenter);
 	    mWorldBoundingSphere.setRadius(mBounds.getMaximum().length());
 
@@ -303,4 +303,10 @@ namespace Ogre
 		// return world flag
 		return SceneManager::WORLD_GEOMETRY_TYPE_MASK;
 	}
+	
+	void PagingLandScapePageRenderable::visitRenderables(Renderable::Visitor* visitor, bool debugRenderables)
+	{
+		visitor->visit(this, 0, debugRenderables);
+	}
+	
 } //namespace
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeRenderable.cpp b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeRenderable.cpp
index 85d21b1..202bb4a 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeRenderable.cpp
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeRenderable.cpp
@@ -1202,7 +1202,7 @@ namespace Ogre
 		if (parent)
 		{
 			assert (mIsLoaded);
-			mCenter = mBounds.getCenter()  + mParentNode->getWorldPosition();
+			mCenter = mBounds.getCenter()  + mParentNode->_getDerivedPosition();
 			mWorldBoundingSphere.setCenter(mCenter);
 			mWorldBoundingSphere.setRadius((mBounds.getMaximum() - mBounds.getMinimum()).length() / 2);
 			mParentNode->needUpdate();
@@ -1289,5 +1289,10 @@ namespace Ogre
 	}
 	///ember addition end
 	
+	void PagingLandScapeRenderable::visitRenderables(Renderable::Visitor* visitor, bool debugRenderables)
+	{
+		visitor->visit(this, 0, debugRenderables);
+	}
+	
 	
 } //namespace
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeTile.cpp b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeTile.cpp
index 7188389..ccb3d74 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeTile.cpp
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/OgrePagingLandScapeTile.cpp
@@ -140,7 +140,7 @@ void PagingLandScapeTile::init (SceneNode *ParentSceneNode,
 		StringConverter::toString(tileZ);
 	mTileSceneNode = mParent->getSceneManager()->createSceneNode (NodeName + ".Node"); 
 
-	const Vector3 ParentPos = ParentSceneNode->getWorldPosition();
+	const Vector3 ParentPos = ParentSceneNode->_getDerivedPosition();
 	const Real MaxHeight = mParent->getSceneManager()->getData2DManager()->getMaxHeight(mInfo->mPageX, mInfo->mPageZ);
 	assert (MaxHeight >= (Real)0.0f);
 	//Change Zone of this page
diff --git a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/filetutils.cpp b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/filetutils.cpp
index cc218c4..536a575 100644
--- a/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/filetutils.cpp
+++ b/src/components/ogre/SceneManagers/EmberPagingSceneManager/src/filetutils.cpp
@@ -9,7 +9,7 @@
 
 #include "OgrePagingLandScapePrecompiledHeaders.h"
 
-#include "OgreNoMemoryMacros.h"
+// #include "OgreNoMemoryMacros.h"
 
 
 #include <sys/types.h>
diff --git a/src/components/ogre/environment/EmberEntityLoader.cpp b/src/components/ogre/environment/EmberEntityLoader.cpp
index 079bca4..5235ef7 100644
--- a/src/components/ogre/environment/EmberEntityLoader.cpp
+++ b/src/components/ogre/environment/EmberEntityLoader.cpp
@@ -82,7 +82,7 @@ void EmberEntityLoader::addEmberEntity(EmberPhysicalEntity * entity)
 	instance.visibilityChangedConnection = entity->VisibilityChanged.connect(sigc::bind(sigc::mem_fun(*this, &EmberEntityLoader::EmberEntity_VisibilityChanged), entity));
 	instance.entity = entity;
 	
-	Ogre::Vector3 position(entity->getSceneNode()->getWorldPosition());
+	Ogre::Vector3 position(entity->getSceneNode()->_getDerivedPosition());
 	instance.lastPosition = position;
 #if EMBERENTITYLOADER_USEBATCH
 	const int batchX = Ogre::Math::Floor(position.x / mBatchSize);
@@ -139,7 +139,7 @@ void EmberEntityLoader::removeEmberEntity(EmberPhysicalEntity * entity)
 	
 #endif
 	///Rebuild geometry if necessary.
-	mGeom.reloadGeometryPage(entity->getSceneNode()->getWorldPosition());
+	mGeom.reloadGeometryPage(entity->getSceneNode()->_getDerivedPosition());
 }
 
 EmberEntityLoader::EntityMap* EmberEntityLoader::getStoreForEntity(EmberPhysicalEntity* entity)
@@ -182,7 +182,7 @@ void EmberEntityLoader::loadPage(::PagedGeometry::PageInfo & page)
 		EmberPhysicalEntity* emberEntity(instance.entity);
 		if (emberEntity->isVisible()) {
 			Ogre::SceneNode* sceneNode(emberEntity->getSceneNode());
-			const Ogre::Vector3& pos(sceneNode->getWorldPosition());
+			const Ogre::Vector3& pos(sceneNode->_getDerivedPosition());
 			Model::Model* model(emberEntity->getModel());
 			if (pos.x > page.bounds.left && pos.x < page.bounds.right && pos.z > page.bounds.top && pos.z < page.bounds.bottom) {
 				for (Model::Model::SubModelSet::const_iterator J = model->getSubmodels().begin(); J != model->getSubmodels().end(); ++J) {
@@ -190,7 +190,7 @@ void EmberEntityLoader::loadPage(::PagedGeometry::PageInfo & page)
 	// 					model->getParentSceneNode()->attachObject((*J)->getEntity());
 	// 				}
 	//  				if ((*J)->getEntity()->isVisible()) {
-						addEntity((*J)->getEntity(), emberEntity->getScaleNode()->getWorldPosition(), emberEntity->getScaleNode()->getWorldOrientation(), 	emberEntity->getScaleNode()->_getDerivedScale(), colour);
+						addEntity((*J)->getEntity(), emberEntity->getScaleNode()->_getDerivedPosition(), emberEntity->getScaleNode()->_getDerivedOrientation(), 	emberEntity->getScaleNode()->_getDerivedScale(), colour);
 	// 					(*J)->getEntity()->setVisible(false);
 	//  				}
 				}
@@ -207,8 +207,8 @@ void EmberEntityLoader::EmberEntity_Moved(EmberPhysicalEntity* entity)
 		if (I != entityMap->end()) {
 			EntityInstance& instance(I->second);
 			mGeom.reloadGeometryPage(instance.lastPosition);
-			mGeom.reloadGeometryPage(instance.entity->getSceneNode()->getWorldPosition());
-			instance.lastPosition = instance.entity->getSceneNode()->getWorldPosition();
+			mGeom.reloadGeometryPage(instance.entity->getSceneNode()->_getDerivedPosition());
+			instance.lastPosition = instance.entity->getSceneNode()->_getDerivedPosition();
 		}
 	}
 }
@@ -221,7 +221,7 @@ void EmberEntityLoader::EmberEntity_BeingDeleted(EmberPhysicalEntity* entity)
 void EmberEntityLoader::EmberEntity_VisibilityChanged(bool visible, EmberPhysicalEntity* entity)
 {
 	///When the visibility changes, we only need to reload the page the entity is on.
-	mGeom.reloadGeometryPage(entity->getSceneNode()->getWorldPosition());
+	mGeom.reloadGeometryPage(entity->getSceneNode()->_getDerivedPosition());
 }
 
 
diff --git a/src/components/ogre/environment/LensFlare.cpp b/src/components/ogre/environment/LensFlare.cpp
index 5967a48..98143b2 100644
--- a/src/components/ogre/environment/LensFlare.cpp
+++ b/src/components/ogre/environment/LensFlare.cpp
@@ -133,7 +133,7 @@ bool LensFlare::createLensFlare()
 
 const Ogre::Vector3& LensFlare::getLightPosition() const
 {
-	return mLightNode->getWorldPosition();
+	return mLightNode->_getDerivedPosition();
 }
 
 
diff --git a/src/components/ogre/environment/Water.cpp b/src/components/ogre/environment/Water.cpp
index 81032f3..c7e88c9 100644
--- a/src/components/ogre/environment/Water.cpp
+++ b/src/components/ogre/environment/Water.cpp
@@ -197,7 +197,9 @@ public:
 	
 	void Water::createFresnelWater(Ogre::Camera &camera, Ogre::SceneManager* mSceneMgr)
 	{
-		RenderTexture* rttTex = EmberOgre::getSingleton().getOgreRoot()->getRenderSystem()->createRenderTexture( "Refraction", 512, 512 );
+		Ogre::TexturePtr texture = TextureManager::getSingleton().createManual("Refraction", "General", TEX_TYPE_2D, 512, 512, 0, PF_A8R8G8B8, TU_RENDERTARGET);	
+		RenderTexture* rttTex = texture->getBuffer()->getRenderTarget();
+/*		RenderTexture* rttTex = EmberOgre::getSingleton().getOgreRoot()->getRenderSystem()->createRenderTexture( "Refraction", 512, 512 );*/
 			
 			{
 				Viewport *v = rttTex->addViewport( &mCamera );
@@ -210,7 +212,8 @@ public:
 			}
 			
 			
-			rttTex = EmberOgre::getSingleton().getOgreRoot()->getRenderSystem()->createRenderTexture( "Reflection", 512, 512 );
+			texture = TextureManager::getSingleton().createManual("Reflection", "General", TEX_TYPE_2D, 512, 512, 0, PF_A8R8G8B8, TU_RENDERTARGET);
+			rttTex = texture->getBuffer()->getRenderTarget();
 			{
 				Viewport *v = rttTex->addViewport( &mCamera );
 				Ogre::MaterialPtr mat = MaterialManager::getSingleton().getByName("Examples/FresnelReflectionRefraction");
diff --git a/src/components/ogre/model/Model.cpp b/src/components/ogre/model/Model.cpp
index 2708b5e..62e4278 100644
--- a/src/components/ogre/model/Model.cpp
+++ b/src/components/ogre/model/Model.cpp
@@ -187,7 +187,6 @@ bool Model::createFromDefn()
 			if (mMasterModel->getRenderingDistance()) {
 				entity->setRenderingDistance(mMasterModel->getRenderingDistance());
 			}
-			entity->setNormaliseNormals(true);
 
 // 			//for convenience, if it's a new mesh, check if there's a skeleton file in the same directory
 // 			//if so, use that
@@ -978,6 +977,19 @@ void Model::removeQueryFlags(unsigned long flags)
 	
 }
 
+void Model::visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables)
+{
+	if (isVisible()) {
+		SubModelSet::const_iterator I = mSubmodels.begin();
+		SubModelSet::const_iterator I_end = mSubmodels.end();
+		for (; I != I_end; ++I) {
+			if ((*I)->getEntity()->isVisible()) {
+				(*I)->getEntity()->visitRenderables(visitor, debugRenderables);
+			}
+		}
+	}	
+}
+
 
 /** Overridden from MovableObject */
 void Model::_notifyAttached(Ogre::Node* parent, bool isTagPoint)
diff --git a/src/components/ogre/model/Model.h b/src/components/ogre/model/Model.h
index 1ad7d76..796746d 100644
--- a/src/components/ogre/model/Model.h
+++ b/src/components/ogre/model/Model.h
@@ -241,6 +241,12 @@ public:
         /** Overridden from MovableObject */
 		virtual bool   isVisible (void) const;
 		
+		/**
+		 * @copydoc Ogre::MovableObject::visitRenderables()
+		 */
+		virtual void visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables);
+
+		
 	/**
 	 *    returns a pointer to the defintion of the Model
 	 * @return 
diff --git a/src/components/ogre/scripting/bindings/lua/ogre/OgreEntity.pkg b/src/components/ogre/scripting/bindings/lua/ogre/OgreEntity.pkg
index 066a077..d497b0b 100644
--- a/src/components/ogre/scripting/bindings/lua/ogre/OgreEntity.pkg
+++ b/src/components/ogre/scripting/bindings/lua/ogre/OgreEntity.pkg
@@ -257,20 +257,6 @@ namespace Ogre {
 		/** @copy MovableObject::getWorldBoundingSphere */
 		const Ogre::Sphere& getWorldBoundingSphere(bool derive = false) const;
 
-        /** If set to true, this forces normals of this entity to be normalised
-            dynamically by the hardware.
-        @remarks
-            This option can be used to prevent lighting variations when scaling an
-            Entity using a SceneNode - normally because this scaling is hardware
-            based, the normals get scaled too which causes lighting to become inconsistent.
-            However, this has an overhead so only do this if you really need to.
-        */
-        void setNormaliseNormals(bool normalise);
-
-        /** Returns true if this entity has auto-normalisation of normals set. */
-        bool getNormaliseNormals(void) const;
-
-
         /** Overridden member from ShadowCaster. */
 //         EdgeData* getEdgeList(void);
         /** Overridden member from ShadowCaster. */
diff --git a/src/components/ogre/scripting/bindings/lua/ogre/OgreNode.pkg b/src/components/ogre/scripting/bindings/lua/ogre/OgreNode.pkg
index b1a9016..1097102 100644
--- a/src/components/ogre/scripting/bindings/lua/ogre/OgreNode.pkg
+++ b/src/components/ogre/scripting/bindings/lua/ogre/OgreNode.pkg
@@ -484,9 +484,9 @@ namespace Ogre {
         */
         void getWorldTransforms(Ogre::Matrix4* xform) const;
         /** @copydoc Renderable::getWorldOrientation */
-        const Ogre::Quaternion& getWorldOrientation(void) const;
+        const Ogre::Quaternion& _getDerivedOrientation(void) const;
         /** @copydoc Renderable::getWorldPosition */
-        const Ogre::Vector3& getWorldPosition(void) const;
+        const Ogre::Vector3& _getDerivedPosition(void) const;
 
         /** Sets the current transform of this node to be the 'initial state' ie that
             position / orientation / scale to be used as a basis for delta values used
diff --git a/src/components/ogre/scripting/bindings/lua/ogre/OgreRoot.pkg b/src/components/ogre/scripting/bindings/lua/ogre/OgreRoot.pkg
index 3d99582..95b1436 100644
--- a/src/components/ogre/scripting/bindings/lua/ogre/OgreRoot.pkg
+++ b/src/components/ogre/scripting/bindings/lua/ogre/OgreRoot.pkg
@@ -554,7 +554,7 @@ namespace Ogre
 //         bool _fireFrameEnded();
 
         /** Gets the number of the current frame. */
-        unsigned long getCurrentFrameNumber(void) const;
+        unsigned long getNextFrameNumber(void) const;
 
         /** Returns the scene manager currently being used to render a frame.
         @remarks
diff --git a/src/components/ogre/scripting/bindings/lua/ogre/lua_Ogre.cpp b/src/components/ogre/scripting/bindings/lua/ogre/lua_Ogre.cpp
index aa62470..d3e1d6b 100644
--- a/src/components/ogre/scripting/bindings/lua/ogre/lua_Ogre.cpp
+++ b/src/components/ogre/scripting/bindings/lua/ogre/lua_Ogre.cpp
@@ -1,6 +1,6 @@
 /*
 ** Lua binding: Ogre
-** Generated automatically by tolua++-1.0.92 on Tue Jun 24 23:27:05 2008.
+** Generated automatically by tolua++-1.0.92.
 */
 
 #ifndef __cplusplus
@@ -10770,71 +10770,6 @@ static int tolua_Ogre_Ogre_Entity_getWorldBoundingSphere00(lua_State* tolua_S)
 }
 #endif //#ifndef TOLUA_DISABLE
 
-/* method: setNormaliseNormals of class  Ogre::Entity */
-#ifndef TOLUA_DISABLE_tolua_Ogre_Ogre_Entity_setNormaliseNormals00
-static int tolua_Ogre_Ogre_Entity_setNormaliseNormals00(lua_State* tolua_S)
-{
-#ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
-     !tolua_isusertype(tolua_S,1,"Ogre::Entity",0,&tolua_err) ||
-     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
-     !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
-  goto tolua_lerror;
- else
-#endif
- {
-  Ogre::Entity* self = (Ogre::Entity*)  tolua_tousertype(tolua_S,1,0);
-  bool normalise = ((bool)  tolua_toboolean(tolua_S,2,0));
-#ifndef TOLUA_RELEASE
-  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setNormaliseNormals'",NULL);
-#endif
-  {
-   self->setNormaliseNormals(normalise);
-  }
- }
- return 0;
-#ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'setNormaliseNormals'.",&tolua_err);
- return 0;
-#endif
-}
-#endif //#ifndef TOLUA_DISABLE
-
-/* method: getNormaliseNormals of class  Ogre::Entity */
-#ifndef TOLUA_DISABLE_tolua_Ogre_Ogre_Entity_getNormaliseNormals00
-static int tolua_Ogre_Ogre_Entity_getNormaliseNormals00(lua_State* tolua_S)
-{
-#ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
-     !tolua_isusertype(tolua_S,1,"const Ogre::Entity",0,&tolua_err) ||
-     !tolua_isnoobj(tolua_S,2,&tolua_err)
- )
-  goto tolua_lerror;
- else
-#endif
- {
-  const Ogre::Entity* self = (const Ogre::Entity*)  tolua_tousertype(tolua_S,1,0);
-#ifndef TOLUA_RELEASE
-  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getNormaliseNormals'",NULL);
-#endif
-  {
-   bool tolua_ret = (bool)  self->getNormaliseNormals();
-   tolua_pushboolean(tolua_S,(bool)tolua_ret);
-  }
- }
- return 1;
-#ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'getNormaliseNormals'.",&tolua_err);
- return 0;
-#endif
-}
-#endif //#ifndef TOLUA_DISABLE
-
 /* method: hasSkeleton of class  Ogre::Entity */
 #ifndef TOLUA_DISABLE_tolua_Ogre_Ogre_Entity_hasSkeleton00
 static int tolua_Ogre_Ogre_Entity_hasSkeleton00(lua_State* tolua_S)
@@ -13050,11 +12985,10 @@ static int tolua_Ogre_Ogre_Node_getWorldTransforms00(lua_State* tolua_S)
 }
 #endif //#ifndef TOLUA_DISABLE
 
-/* method: getWorldOrientation of class  Ogre::Node */
-#ifndef TOLUA_DISABLE_tolua_Ogre_Ogre_Node_getWorldOrientation00
-static int tolua_Ogre_Ogre_Node_getWorldOrientation00(lua_State* tolua_S)
+/* method: _getDerivedOrientation of class  Ogre::Node */
+#ifndef TOLUA_DISABLE_tolua_Ogre_Ogre_Node__getDerivedOrientation01
+static int tolua_Ogre_Ogre_Node__getDerivedOrientation01(lua_State* tolua_S)
 {
-#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (
      !tolua_isusertype(tolua_S,1,"const Ogre::Node",0,&tolua_err) ||
@@ -13062,31 +12996,26 @@ static int tolua_Ogre_Ogre_Node_getWorldOrientation00(lua_State* tolua_S)
  )
   goto tolua_lerror;
  else
-#endif
  {
   const Ogre::Node* self = (const Ogre::Node*)  tolua_tousertype(tolua_S,1,0);
 #ifndef TOLUA_RELEASE
-  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getWorldOrientation'",NULL);
+  if (!self) tolua_error(tolua_S,"invalid 'self' in function '_getDerivedOrientation'",NULL);
 #endif
   {
-   const Ogre::Quaternion& tolua_ret = (const Ogre::Quaternion&)  self->getWorldOrientation();
+   const Ogre::Quaternion& tolua_ret = (const Ogre::Quaternion&)  self->_getDerivedOrientation();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Ogre::Quaternion");
   }
  }
  return 1;
-#ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'getWorldOrientation'.",&tolua_err);
- return 0;
-#endif
+tolua_lerror:
+ return tolua_Ogre_Ogre_Node__getDerivedOrientation00(tolua_S);
 }
 #endif //#ifndef TOLUA_DISABLE
 
-/* method: getWorldPosition of class  Ogre::Node */
-#ifndef TOLUA_DISABLE_tolua_Ogre_Ogre_Node_getWorldPosition00
-static int tolua_Ogre_Ogre_Node_getWorldPosition00(lua_State* tolua_S)
+/* method: _getDerivedPosition of class  Ogre::Node */
+#ifndef TOLUA_DISABLE_tolua_Ogre_Ogre_Node__getDerivedPosition01
+static int tolua_Ogre_Ogre_Node__getDerivedPosition01(lua_State* tolua_S)
 {
-#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (
      !tolua_isusertype(tolua_S,1,"const Ogre::Node",0,&tolua_err) ||
@@ -13094,23 +13023,19 @@ static int tolua_Ogre_Ogre_Node_getWorldPosition00(lua_State* tolua_S)
  )
   goto tolua_lerror;
  else
-#endif
  {
   const Ogre::Node* self = (const Ogre::Node*)  tolua_tousertype(tolua_S,1,0);
 #ifndef TOLUA_RELEASE
-  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getWorldPosition'",NULL);
+  if (!self) tolua_error(tolua_S,"invalid 'self' in function '_getDerivedPosition'",NULL);
 #endif
   {
-   const Ogre::Vector3& tolua_ret = (const Ogre::Vector3&)  self->getWorldPosition();
+   const Ogre::Vector3& tolua_ret = (const Ogre::Vector3&)  self->_getDerivedPosition();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const Ogre::Vector3");
   }
  }
  return 1;
-#ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'getWorldPosition'.",&tolua_err);
- return 0;
-#endif
+tolua_lerror:
+ return tolua_Ogre_Ogre_Node__getDerivedPosition00(tolua_S);
 }
 #endif //#ifndef TOLUA_DISABLE
 
@@ -18677,9 +18602,9 @@ static int tolua_Ogre_Ogre_Root_getTimer00(lua_State* tolua_S)
 }
 #endif //#ifndef TOLUA_DISABLE
 
-/* method: getCurrentFrameNumber of class  Ogre::Root */
-#ifndef TOLUA_DISABLE_tolua_Ogre_Ogre_Root_getCurrentFrameNumber00
-static int tolua_Ogre_Ogre_Root_getCurrentFrameNumber00(lua_State* tolua_S)
+/* method: getNextFrameNumber of class  Ogre::Root */
+#ifndef TOLUA_DISABLE_tolua_Ogre_Ogre_Root_getNextFrameNumber00
+static int tolua_Ogre_Ogre_Root_getNextFrameNumber00(lua_State* tolua_S)
 {
 #ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
@@ -18693,17 +18618,17 @@ static int tolua_Ogre_Ogre_Root_getCurrentFrameNumber00(lua_State* tolua_S)
  {
   const Ogre::Root* self = (const Ogre::Root*)  tolua_tousertype(tolua_S,1,0);
 #ifndef TOLUA_RELEASE
-  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getCurrentFrameNumber'",NULL);
+  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'getNextFrameNumber'",NULL);
 #endif
   {
-   unsigned long tolua_ret = (unsigned long)  self->getCurrentFrameNumber();
+   unsigned long tolua_ret = (unsigned long)  self->getNextFrameNumber();
    tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
   }
  }
  return 1;
 #ifndef TOLUA_RELEASE
  tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'getCurrentFrameNumber'.",&tolua_err);
+ tolua_error(tolua_S,"#ferror in function 'getNextFrameNumber'.",&tolua_err);
  return 0;
 #endif
 }
@@ -19240,8 +19165,6 @@ TOLUA_API int tolua_Ogre_open (lua_State* tolua_S)
     tolua_function(tolua_S,"getBoundingRadius",tolua_Ogre_Ogre_Entity_getBoundingRadius00);
     tolua_function(tolua_S,"getWorldBoundingBox",tolua_Ogre_Ogre_Entity_getWorldBoundingBox00);
     tolua_function(tolua_S,"getWorldBoundingSphere",tolua_Ogre_Ogre_Entity_getWorldBoundingSphere00);
-    tolua_function(tolua_S,"setNormaliseNormals",tolua_Ogre_Ogre_Entity_setNormaliseNormals00);
-    tolua_function(tolua_S,"getNormaliseNormals",tolua_Ogre_Ogre_Entity_getNormaliseNormals00);
     tolua_function(tolua_S,"hasSkeleton",tolua_Ogre_Ogre_Entity_hasSkeleton00);
     tolua_function(tolua_S,"getSkeleton",tolua_Ogre_Ogre_Entity_getSkeleton00);
     tolua_function(tolua_S,"isHardwareAnimationEnabled",tolua_Ogre_Ogre_Entity_isHardwareAnimationEnabled00);
@@ -19323,8 +19246,8 @@ TOLUA_API int tolua_Ogre_open (lua_State* tolua_S)
     tolua_function(tolua_S,"_update",tolua_Ogre_Ogre_Node__update00);
     tolua_function(tolua_S,"getMaterial",tolua_Ogre_Ogre_Node_getMaterial00);
     tolua_function(tolua_S,"getWorldTransforms",tolua_Ogre_Ogre_Node_getWorldTransforms00);
-    tolua_function(tolua_S,"getWorldOrientation",tolua_Ogre_Ogre_Node_getWorldOrientation00);
-    tolua_function(tolua_S,"getWorldPosition",tolua_Ogre_Ogre_Node_getWorldPosition00);
+    tolua_function(tolua_S,"_getDerivedOrientation",tolua_Ogre_Ogre_Node__getDerivedOrientation01);
+    tolua_function(tolua_S,"_getDerivedPosition",tolua_Ogre_Ogre_Node__getDerivedPosition01);
     tolua_function(tolua_S,"setInitialState",tolua_Ogre_Ogre_Node_setInitialState00);
     tolua_function(tolua_S,"resetToInitialState",tolua_Ogre_Ogre_Node_resetToInitialState00);
     tolua_function(tolua_S,"getInitialPosition",tolua_Ogre_Ogre_Node_getInitialPosition00);
@@ -19576,7 +19499,7 @@ TOLUA_API int tolua_Ogre_open (lua_State* tolua_S)
     tolua_function(tolua_S,"removeFrameListener",tolua_Ogre_Ogre_Root_removeFrameListener00);
     tolua_function(tolua_S,"convertColourValue",tolua_Ogre_Ogre_Root_convertColourValue00);
     tolua_function(tolua_S,"getTimer",tolua_Ogre_Ogre_Root_getTimer00);
-    tolua_function(tolua_S,"getCurrentFrameNumber",tolua_Ogre_Ogre_Root_getCurrentFrameNumber00);
+    tolua_function(tolua_S,"getNextFrameNumber",tolua_Ogre_Ogre_Root_getNextFrameNumber00);
     tolua_function(tolua_S,"getSingleton",tolua_Ogre_Ogre_Root_getSingleton00);
    tolua_endmodule(tolua_S);
   tolua_endmodule(tolua_S);
diff --git a/src/components/ogre/widgets/Compass.cpp b/src/components/ogre/widgets/Compass.cpp
index 06ab939..04a517a 100644
--- a/src/components/ogre/widgets/Compass.cpp
+++ b/src/components/ogre/widgets/Compass.cpp
@@ -240,7 +240,7 @@ CompassCameraAnchor::~CompassCameraAnchor()
 
 
 CompassSceneNodeAnchor::CompassSceneNodeAnchor(Compass& compass, Ogre::SceneNode* sceneNode)
-: mAnchor(compass, sceneNode->getWorldPosition(), sceneNode->getWorldOrientation())
+: mAnchor(compass, sceneNode->_getDerivedPosition(), sceneNode->_getDerivedOrientation())
 , mSceneNode(sceneNode)
 {
 }
diff --git a/src/components/ogre/widgets/IngameChatWidget.cpp b/src/components/ogre/widgets/IngameChatWidget.cpp
index 29fc463..31f3e6b 100644
--- a/src/components/ogre/widgets/IngameChatWidget.cpp
+++ b/src/components/ogre/widgets/IngameChatWidget.cpp
@@ -264,7 +264,7 @@ void IngameChatWidget::EntityObserver::updateLabel(const Ogre::Camera * camera)
 	//	Ogre::Vector3 entityWorldCoords = window->getEntity()->getSceneNode()->_getWorldAABB().getCenter();
 	// 	const Ogre::Vector3& cameraCoords = camera->getDerivedPosition();
 	///getWorldPosition is faster than getting the center of the boundingbox...
-		Ogre::Vector3 diff = mEntity->getSceneNode()->getWorldPosition() - camera->getWorldPosition();
+		Ogre::Vector3 diff = mEntity->getSceneNode()->_getDerivedPosition() - camera->getDerivedPosition();
 		
 		///remove the window if it's either too far away
 		if (diff.length() > mChatWidget.mDistanceShown) {
diff --git a/src/components/ogre/widgets/LoadingBar.cpp b/src/components/ogre/widgets/LoadingBar.cpp
index b7b20e5..dc4baec 100644
--- a/src/components/ogre/widgets/LoadingBar.cpp
+++ b/src/components/ogre/widgets/LoadingBar.cpp
@@ -269,11 +269,11 @@ namespace Gui {
 		mProgressBarInc /= (Real)scriptCount;
 		mSection.setCaption("Parsing scripts...");
 	}
-	void ResourceGroupLoadingBarSection::scriptParseStarted(const String& scriptName)
+	void ResourceGroupLoadingBarSection::scriptParseStarted(const String& scriptName, bool& skipThisScript)
 	{
 		mSection.setCaption(scriptName);
 	}
-	void ResourceGroupLoadingBarSection::scriptParseEnded(const Ogre::String& scriptName)
+	void ResourceGroupLoadingBarSection::scriptParseEnded(const Ogre::String& scriptName, bool skipped)
 	{
 		///make the black blocking block a little bit smaller and move it to the right
 		mSection.tick(mProgressBarInc);
diff --git a/src/components/ogre/widgets/LoadingBar.h b/src/components/ogre/widgets/LoadingBar.h
index b44398b..9f9ad2b 100644
--- a/src/components/ogre/widgets/LoadingBar.h
+++ b/src/components/ogre/widgets/LoadingBar.h
@@ -85,8 +85,8 @@ public:
 
 	// ResourceGroupListener callbacks
 	void resourceGroupScriptingStarted(const Ogre::String & groupName, size_t scriptCount);
-	void scriptParseStarted(const Ogre::String & scriptName);
-	void scriptParseEnded(const Ogre::String& scriptName);
+	void scriptParseStarted(const Ogre::String & scriptName, bool& skipThisScript);
+	void scriptParseEnded(const Ogre::String& scriptName, bool skipped);
 	void resourceGroupScriptingEnded(const Ogre::String & groupName) {}
 	void resourceGroupLoadStarted(const Ogre::String & groupName, size_t resourceCount);
 	void resourceLoadStarted(const Ogre::ResourcePtr& resource);
diff --git a/src/services/sound/SoundService.cpp b/src/services/sound/SoundService.cpp
index f0024af..1403c83 100644
--- a/src/services/sound/SoundService.cpp
+++ b/src/services/sound/SoundService.cpp
@@ -31,6 +31,7 @@
 
 #include <map>
 #include <cstring>
+#include <algorithm>
 
 #ifndef __WIN32__
 #include <AL/alut.h>


Index: ember.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ember/devel/ember.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ember.spec	12 Sep 2008 06:05:01 -0000	1.1
+++ ember.spec	2 Oct 2008 18:28:30 -0000	1.2
@@ -1,6 +1,6 @@
 Name:           ember
 Version:        0.5.4
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Ember - a client for Worldforge
 
 Group:          Amusements/Games
@@ -8,6 +8,7 @@
 URL:            http://www.worldforge.org/dev/eng/clients/ember
 Source0:        http://downloads.sourceforge.net/worldforge/%{name}-%{version}.tar.bz2
 Patch0:         ember-0.5.4-gcc43.patch
+Patch1:         ember-0.5.4-ogre16.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  SDL-devel tinyxml-devel DevIL-devel cegui-devel ogre-devel
@@ -25,6 +26,7 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 # Encoding fix
 iconv -f iso-8859-1 -t utf-8 AUTHORS > AUTHORS.conv && mv -f AUTHORS.conv AUTHORS
@@ -81,6 +83,9 @@
 
 
 %changelog
+* Thu Oct 02 2008 Alexey Torkhov <atorkhov at gmail.com> 0.5.4-2
+- Update for new OGRE
+
 * Tue Sep 09 2008 Alexey Torkhov <atorkhov at gmail.com> 0.5.4-1
 - Update to 0.5.4.
 




More information about the scm-commits mailing list