Commits

Assaf Raman committed 65b3988 Merge

Merge with v1-8

Comments (0)

Files changed (308)

CMake/ConfigureBuild.cmake

 set(OGRE_SET_DISABLE_PVRTC 0)
 set(OGRE_SET_DISABLE_ZIP 0)
 set(OGRE_SET_DISABLE_VIEWPORT_ORIENTATIONMODE 0)
+set(OGRE_SET_DISABLE_GLES2_CG_SUPPORT 0)
+set(OGRE_SET_DISABLE_GLES2_GLSL_OPTIMISER 0)
 set(OGRE_SET_NEW_COMPILERS 0)
 set(OGRE_STATIC_LIB 0)
 set(OGRE_SET_USE_BOOST 0)
 if (NOT OGRE_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE)
   set(OGRE_SET_DISABLE_VIEWPORT_ORIENTATIONMODE 1)
 endif()
+if (NOT OGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT)
+  set(OGRE_SET_DISABLE_GLES2_CG_SUPPORT 1)
+endif()
+if (NOT OGRE_CONFIG_ENABLE_GLES2_GLSL_OPTIMISER)
+  set(OGRE_SET_DISABLE_GLES2_GLSL_OPTIMISER 1)
+endif()
 if(OGRE_CONFIG_NEW_COMPILERS)
   set(OGRE_SET_NEW_COMPILERS 1)
 endif()

CMake/FeatureSummary.cmake

 if (OGRE_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE)
 	set(_core "${_core}  + Viewport orientation mode support\n")
 endif ()
+if (OGRE_CONFIG_ENABLE_GLES2_GLSL_OPTIMISER)
+	set(_core "${_core}  + GLSL Optimiser for OpenGL ES 2.0\n")
+endif ()
+if (OGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT)
+	set(_core "${_core}  + Cg for OpenGL ES 2.0\n")
+endif ()
 
 if (DEFINED _core)
 	set(_features "${_features}Building core features:\n${_core}")

CMake/Templates/OgreBuildSettings.h.in

 #cmakedefine OGRE_BUILD_RENDERSYSTEM_GL
 #cmakedefine OGRE_BUILD_RENDERSYSTEM_GLES
 #cmakedefine OGRE_BUILD_RENDERSYSTEM_GLES2
-#cmakedefine OGRE_CG_SUPPORT_FOR_GLES2
 #cmakedefine OGRE_BUILD_PLUGIN_BSP
 #cmakedefine OGRE_BUILD_PLUGIN_OCTREE
 #cmakedefine OGRE_BUILD_PLUGIN_PCZ
 
 #define OGRE_NO_VIEWPORT_ORIENTATIONMODE @OGRE_SET_DISABLE_VIEWPORT_ORIENTATIONMODE@
 
+#define OGRE_NO_GLES2_CG_SUPPORT @OGRE_SET_DISABLE_GLES2_CG_SUPPORT@
+
+#define OGRE_NO_GLES2_GLSL_OPTIMISER @OGRE_SET_DISABLE_GLES2_GLSL_OPTIMISER@
+
 #define OGRE_USE_NEW_COMPILERS @OGRE_SET_NEW_COMPILERS@
 
 #define OGRE_USE_BOOST @OGRE_SET_USE_BOOST@

CMake/Utils/OgreConfigTargets.cmake

 # setup plugin build
 function(ogre_config_plugin PLUGINNAME)
   ogre_config_common(${PLUGINNAME})
+  set_target_properties(${PLUGINNAME} PROPERTIES VERSION ${OGRE_SOVERSION})
   if (OGRE_STATIC)
     # add static prefix, if compiling static version
     set_target_properties(${PLUGINNAME} PROPERTIES OUTPUT_NAME ${PLUGINNAME}Static)
 cmake_dependent_option(OGRE_BUILD_RENDERSYSTEM_GL "Build OpenGL RenderSystem" TRUE "OPENGL_FOUND;NOT OGRE_BUILD_PLATFORM_APPLE_IOS;NOT OGRE_BUILD_PLATFORM_TEGRA2;NOT SYMBIAN" FALSE)
 cmake_dependent_option(OGRE_BUILD_RENDERSYSTEM_GLES "Build OpenGL ES 1.x RenderSystem" FALSE "OPENGLES_FOUND" FALSE)
 cmake_dependent_option(OGRE_BUILD_RENDERSYSTEM_GLES2 "Build OpenGL ES 2.x RenderSystem" FALSE "OPENGLES2_FOUND" FALSE)
-cmake_dependent_option(OGRE_CG_SUPPORT_FOR_GLES2 "Enable Cg support to ES 2 render system" FALSE "OGRE_BUILD_RENDERSYSTEM_GLES2" FALSE)
-cmake_dependent_option(OGRE_USE_GLES2_GLSL_OPTIMISER "Enable GLSL optimiser use in GLES 2 render system" TRUE "OGRE_BUILD_RENDERSYSTEM_GLES2" FALSE)
 cmake_dependent_option(OGRE_BUILD_PLATFORM_APPLE_IOS "Build Ogre for iOS" FALSE "iPhoneSDK_FOUND;OPENGLES_FOUND;OPENGLES2_FOUND" FALSE)
 cmake_dependent_option(OGRE_BUILD_PLATFORM_TEGRA2 "Build Ogre for NVIDIA Tegra 2 with Linux" FALSE "OGRE_BUILD_PLATFORM_TEGRA2;OPENGLES2_FOUND" FALSE)
 cmake_dependent_option(OGRE_BUILD_PLATFORM_NACL "Build Ogre for Google's Native Client (NaCl)" FALSE "OPENGLES2_FOUND" FALSE)
 cmake_dependent_option(OGRE_CONFIG_ENABLE_ZIP "Build ZIP archive support. If you disable this option, you cannot use ZIP archives resource locations. The samples won't work." TRUE "ZZip_FOUND" FALSE)
 option(OGRE_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE "Include Viewport orientation mode support." FALSE)
 option(OGRE_CONFIG_NEW_COMPILERS "Use the new script compilers." TRUE)
+cmake_dependent_option(OGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT "Enable Cg support to ES 2 render system" FALSE "OGRE_BUILD_RENDERSYSTEM_GLES2" FALSE)
+cmake_dependent_option(OGRE_CONFIG_ENABLE_GLES2_GLSL_OPTIMISER "Enable GLSL optimiser use in GLES 2 render system" TRUE "OGRE_BUILD_RENDERSYSTEM_GLES2" FALSE)
 cmake_dependent_option(OGRE_USE_BOOST "Use Boost extensions" TRUE "Boost_FOUND" FALSE)
 # Customise what to install
 option(OGRE_INSTALL_SAMPLES "Install Ogre demos." FALSE)
   OGRE_CONFIG_ENABLE_PVRTC
   OGRE_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE
   OGRE_CONFIG_ENABLE_ZIP
+  OGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT
+  OGRE_CONFIG_ENABLE_GLES2_GLSL_OPTIMISER
   OGRE_USE_BOOST
   OGRE_INSTALL_SAMPLES_SOURCE
   OGRE_FULL_RPATH

Components/Property/include/OgreProperty.h

 		/** Reports whether this property set contains a named property. */
 		bool hasProperty(const String& name) const;
 
+        /** Removes the named property from the property set. */
+        void removeProperty(const String& name);
+
 		typedef map<String, PropertyBase*>::type PropertyMap;
 		typedef Ogre::MapIterator<PropertyMap> PropertyIterator;
 		/// Get an iterator over the available properties

Components/Property/src/OgreProperty.cpp

 		else
 			OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, "Property not found!", 
 				"PropertySet::getProperty");
-
 	}
+    //---------------------------------------------------------------------
+    void PropertySet::removeProperty(const String& name)
+    {
+        mPropertyMap.erase(name);
+    }
 	//---------------------------------------------------------------------
 	PropertySet::PropertyIterator PropertySet::getPropertyIterator()
 	{

Components/RTShaderSystem/include/OgreShaderExDualQuaternionSkinning.h

 (Object-oriented Graphics Rendering Engine)
 For the latest info, see http://www.ogre3d.org
 
-Copyright (c) 2000-2009 Torus Knot Software Ltd
+Copyright (c) 2000-2011 Torus Knot Software Ltd
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights

Components/RTShaderSystem/include/OgreShaderExHardwareSkinningTechnique.h

 (Object-oriented Graphics Rendering Engine)
 For the latest info, see http://www.ogre3d.org
 
-Copyright (c) 2000-2009 Torus Knot Software Ltd
+Copyright (c) 2000-2011 Torus Knot Software Ltd
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights

Components/RTShaderSystem/include/OgreShaderExLinearSkinning.h

 (Object-oriented Graphics Rendering Engine)
 For the latest info, see http://www.ogre3d.org
 
-Copyright (c) 2000-2009 Torus Knot Software Ltd
+Copyright (c) 2000-2011 Torus Knot Software Ltd
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights

Components/RTShaderSystem/include/OgreShaderFunction.h

 	};
 
 	/** Get the name of this function */
-	const String&				getName					() const { return m_name; }
+	const String&				getName					() const { return mName; }
 
 	/** Get the description of this function */
-	const String&				getDescription			() const { return m_description; }
+	const String&				getDescription			() const { return mDescription; }
 
 	/** Resolve input parameter of this function
 	@param semantic The desired parameter semantic.
 	static int					sAtomInstanceCompare		(const void * p0, const void *p1);
 
 protected:
-	String						m_name;						// Function name.
-	String						m_description;				// Function description.
+	String						mName;						// Function name.
+	String						mDescription;				// Function description.
 	ShaderParameterList			mInputParameters;			// Input parameters.
 	ShaderParameterList			mOutputParameters;			// Output parameters.
 	ShaderParameterList			mLocalParameters;			// Local parameters.
 	FunctionAtomInstanceList	mAtomInstances;				// Atom instances composing this function.
-	FunctionType				m_functionType;				// Function type
+	FunctionType				mFunctionType;				// Function type
 	
 private:
 	friend class Program;

Components/RTShaderSystem/src/OgreRTShaderSystem.cpp

 
 //-----------------------------------------------------------------------
 template<> 
-RTShader::RTShaderSystem* Singleton<RTShader::RTShaderSystem>::ms_Singleton = 0;
+RTShader::RTShaderSystem* Singleton<RTShader::RTShaderSystem>::msSingleton = 0;
 
 namespace RTShader {
 
 //-----------------------------------------------------------------------
 RTShaderSystem& RTShaderSystem::getSingleton()
 {
-	assert( ms_Singleton );  
-	return ( *ms_Singleton );
+	assert( msSingleton );  
+	return ( *msSingleton );
 }
 
 //-----------------------------------------------------------------------
 RTShaderSystem* RTShaderSystem::getSingletonPtr()
 {
-	assert( ms_Singleton );  
-	return ms_Singleton;
+	assert( msSingleton );  
+	return msSingleton;
 }
 
 }

Components/RTShaderSystem/src/OgreShaderExDualQuaternionSkinning.cpp

 (Object-oriented Graphics Rendering Engine)
 For the latest info, see http://www.ogre3d.org
 
-Copyright (c) 2000-2009 Torus Knot Software Ltd
+Copyright (c) 2000-2011 Torus Knot Software Ltd
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 	//Antipodality doesn't need to be adjusted for dq0 on itself (used as the basis of antipodality calculations)
 	if(index > 0)
 	{
-		Operand::OpMask indexMask = indexToMask(index);
-
 		curFuncInvocation = OGRE_NEW FunctionInvocation(SGX_FUNC_ANTIPODALITY_ADJUSTMENT, FFP_VS_TRANSFORM, funcCounter++);
 		//This is the base dual quaternion dq0, which the antipodality calculations are based on
 		curFuncInvocation->pushOperand(mParamInitialDQ, Operand::OPS_IN);

Components/RTShaderSystem/src/OgreShaderExHardwareSkinning.cpp

 
 
 namespace Ogre {
-template<> RTShader::HardwareSkinningFactory* Singleton<RTShader::HardwareSkinningFactory>::ms_Singleton = 0;
+template<> RTShader::HardwareSkinningFactory* Singleton<RTShader::HardwareSkinningFactory>::msSingleton = 0;
 
 namespace RTShader {
 
 HardwareSkinningFactory* HardwareSkinningFactory::getSingletonPtr(void)
 {
-    return ms_Singleton;
+    return msSingleton;
 }
 HardwareSkinningFactory& HardwareSkinningFactory::getSingleton(void)
 {  
-    assert( ms_Singleton );  return ( *ms_Singleton );
+    assert( msSingleton );  return ( *msSingleton );
 }
 
 String HardwareSkinning::Type = "SGX_HardwareSkinning";
 /*                                                                      */
 /************************************************************************/
 HardwareSkinning::HardwareSkinning() :
-	mSkinningType(ST_LINEAR),
-	mCreator(NULL)
+	mCreator(NULL),
+	mSkinningType(ST_LINEAR)
 {
 }
 

Components/RTShaderSystem/src/OgreShaderExHardwareSkinningTechnique.cpp

 (Object-oriented Graphics Rendering Engine)
 For the latest info, see http://www.ogre3d.org
 
-Copyright (c) 2000-2009 Torus Knot Software Ltd
+Copyright (c) 2000-2011 Torus Knot Software Ltd
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights

Components/RTShaderSystem/src/OgreShaderExLinearSkinning.cpp

 (Object-oriented Graphics Rendering Engine)
 For the latest info, see http://www.ogre3d.org
 
-Copyright (c) 2000-2009 Torus Knot Software Ltd
+Copyright (c) 2000-2011 Torus Knot Software Ltd
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights

Components/RTShaderSystem/src/OgreShaderExTextureAtlasSampler.cpp

 #define TAS_MAX_SAFE_ATLASED_TEXTURES 250
 
 namespace Ogre {
-template<> RTShader::TextureAtlasSamplerFactory* Singleton<RTShader::TextureAtlasSamplerFactory>::ms_Singleton = 0;
+template<> RTShader::TextureAtlasSamplerFactory* Singleton<RTShader::TextureAtlasSamplerFactory>::msSingleton = 0;
 
 namespace RTShader {
 
 
 TextureAtlasSamplerFactory* TextureAtlasSamplerFactory::getSingletonPtr(void)
 {
-	return ms_Singleton;
+	return msSingleton;
 }
 TextureAtlasSamplerFactory& TextureAtlasSamplerFactory::getSingleton(void)
 {  
-	assert( ms_Singleton );  return ( *ms_Singleton );  
+	assert( msSingleton );  return ( *msSingleton );  
 }
 
 

Components/RTShaderSystem/src/OgreShaderFFPRenderStateBuilder.cpp

 
 //-----------------------------------------------------------------------
 template<> 
-RTShader::FFPRenderStateBuilder* Singleton<RTShader::FFPRenderStateBuilder>::ms_Singleton = 0;
+RTShader::FFPRenderStateBuilder* Singleton<RTShader::FFPRenderStateBuilder>::msSingleton = 0;
 
 namespace RTShader {
 
 //-----------------------------------------------------------------------
 FFPRenderStateBuilder* FFPRenderStateBuilder::getSingletonPtr()
 {
-	assert( ms_Singleton );  
-	return ms_Singleton;
+	assert( msSingleton );  
+	return msSingleton;
 }
 
 //-----------------------------------------------------------------------
 FFPRenderStateBuilder& FFPRenderStateBuilder::getSingleton()
 {
-	assert( ms_Singleton );  
-	return ( *ms_Singleton );
+	assert( msSingleton );  
+	return ( *msSingleton );
 }
 
 //-----------------------------------------------------------------------------

Components/RTShaderSystem/src/OgreShaderFFPTexturing.cpp

 	case LBX_BLEND_CURRENT_ALPHA:
 		curFuncInvocation = OGRE_NEW FunctionInvocation(FFP_FUNC_LERP, groupOrder, internalCounter++);
 		curFuncInvocation->pushOperand(arg2, Operand::OPS_IN, targetChannels);
-		curFuncInvocation->pushOperand(arg1, Operand::OPS_OUT, targetChannels);
+		curFuncInvocation->pushOperand(arg1, Operand::OPS_IN, targetChannels);
 
 		if (samplerIndex == 0)
 			curFuncInvocation->pushOperand(mPSDiffuse, Operand::OPS_IN, Operand::OPM_W);

Components/RTShaderSystem/src/OgreShaderFunction.cpp

 //-----------------------------------------------------------------------------
 Function::Function(const String& name, const String& desc, const FunctionType functionType)
 {
-	m_name			= name;
-	m_description	= desc;
-	m_functionType	= functionType;
+	mName			= name;
+	mDescription	= desc;
+	mFunctionType	= functionType;
 }
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 Ogre::RTShader::Function::FunctionType Function::getFunctionType() const
 {
-	return m_functionType;
+	return mFunctionType;
 }
 
 }

Components/RTShaderSystem/src/OgreShaderFunctionAtom.cpp

             return false;
     }
 
-    return false;
+    return true;
 }
 
 bool FunctionInvocation::FunctionInvocationCompare::operator ()(FunctionInvocation const& lhs, FunctionInvocation const& rhs) const

Components/RTShaderSystem/src/OgreShaderGLSLESProgramWriter.cpp

             }
             else
             {
-            LogManager::getSingleton().logMessage("ERROR: Cached function not found " + invoc.getFunctionName());
+                LogManager::getSingleton().logMessage("ERROR: Cached function not found " + invoc.getFunctionName());
             }
         }
         
                 }
             }
 
-            endIt = forwardDecl.end();
             // Parse the source shader and write out only the needed functions
-            for (FunctionVector::const_iterator it = forwardDecl.begin(); it != endIt; ++it)
+            for (FunctionVector::const_iterator it = forwardDecl.begin(); it != forwardDecl.end(); ++it)
             {
                 FunctionMap::const_iterator itCache = mFunctionCacheMap.begin();
                 FunctionInvocation invoc = FunctionInvocation("", 0, 0);
                         // First, look for a return type
                         if(isBasicType(tokens[0]) && ((tokens.size() < 3) || (tokens[2] != "=")) )
                         {
-                            String functionSig;
-                            String functionBody;
+                            String functionSig = "";
+                            String functionBody = "";
                             FunctionInvocation *functionInvoc = NULL;
 
                             // Return type
-                            functionSig += tokens[0];
+                            functionSig = tokens[0];
                             functionSig += " ";
 
                             // Function name

Components/RTShaderSystem/src/OgreShaderGenerator.cpp

 
 //-----------------------------------------------------------------------
 template<> 
-RTShader::ShaderGenerator* Singleton<RTShader::ShaderGenerator>::ms_Singleton = 0;
+RTShader::ShaderGenerator* Singleton<RTShader::ShaderGenerator>::msSingleton = 0;
 
 namespace RTShader {
 
 //-----------------------------------------------------------------------
 ShaderGenerator* ShaderGenerator::getSingletonPtr()
 {
-	assert( ms_Singleton );  
-	return ms_Singleton;
+	assert( msSingleton );  
+	return msSingleton;
 }
 
 //-----------------------------------------------------------------------
 ShaderGenerator& ShaderGenerator::getSingleton()
 {
-	assert( ms_Singleton );  
-	return ( *ms_Singleton );
+	assert( msSingleton );  
+	return ( *msSingleton );
 }
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 bool ShaderGenerator::initialize()
 {
-	if (ms_Singleton == NULL)
+	if (msSingleton == NULL)
 	{
-		ms_Singleton = OGRE_NEW ShaderGenerator;
-		if (false == ms_Singleton->_initialize())
+		msSingleton = OGRE_NEW ShaderGenerator;
+		if (false == msSingleton->_initialize())
 		{
-			OGRE_DELETE ms_Singleton;
-			ms_Singleton = NULL;
+			OGRE_DELETE msSingleton;
+			msSingleton = NULL;
 			return false;
 		}
 	}
 //-----------------------------------------------------------------------------
 void ShaderGenerator::finalize()
 {
-	if (ms_Singleton != NULL)
+	if (msSingleton != NULL)
 	{
-		ms_Singleton->_finalize();
+		msSingleton->_finalize();
 
-		OGRE_DELETE ms_Singleton;
-		ms_Singleton = NULL;
+		OGRE_DELETE msSingleton;
+		msSingleton = NULL;
 	}
 }
 

Components/RTShaderSystem/src/OgreShaderProgramManager.cpp

 
 //-----------------------------------------------------------------------
 template<> 
-RTShader::ProgramManager* Singleton<RTShader::ProgramManager>::ms_Singleton = 0;
+RTShader::ProgramManager* Singleton<RTShader::ProgramManager>::msSingleton = 0;
 
 namespace RTShader {
 
 //-----------------------------------------------------------------------
 ProgramManager* ProgramManager::getSingletonPtr()
 {
-	assert( ms_Singleton );  
-	return ms_Singleton;
+	assert( msSingleton );  
+	return msSingleton;
 }
 
 //-----------------------------------------------------------------------
 ProgramManager& ProgramManager::getSingleton()
 {
-	assert( ms_Singleton );  
-	return ( *ms_Singleton );
+	assert( msSingleton );  
+	return ( *msSingleton );
 }
 
 //-----------------------------------------------------------------------------

Components/RTShaderSystem/src/OgreShaderProgramWriterManager.cpp

 
 //-----------------------------------------------------------------------
 template<> 
-RTShader::ProgramWriterManager* Singleton<RTShader::ProgramWriterManager>::ms_Singleton = 0;
+RTShader::ProgramWriterManager* Singleton<RTShader::ProgramWriterManager>::msSingleton = 0;
 
 namespace RTShader {
 //-----------------------------------------------------------------------
 ProgramWriterManager* ProgramWriterManager::getSingletonPtr(void)
 {
-	assert( ms_Singleton );  
-	return ms_Singleton;
+	assert( msSingleton );  
+	return msSingleton;
 }
 //-----------------------------------------------------------------------
 ProgramWriterManager& ProgramWriterManager::getSingleton(void)
 {  
-	assert( ms_Singleton );  
-	return ( *ms_Singleton );  
+	assert( msSingleton );  
+	return ( *msSingleton );  
 }
 //-----------------------------------------------------------------------
 ProgramWriterManager::ProgramWriterManager()

Components/Terrain/src/OgreTerrain.cpp

 	// This MUST match the bitwise OR of all the types above with no extra bits!
 	const uint8 Terrain::DERIVED_DATA_ALL = 7;
 	//-----------------------------------------------------------------------
-	template<> TerrainGlobalOptions* Singleton<TerrainGlobalOptions>::ms_Singleton = 0;
+	template<> TerrainGlobalOptions* Singleton<TerrainGlobalOptions>::msSingleton = 0;
 	TerrainGlobalOptions* TerrainGlobalOptions::getSingletonPtr(void)
 	{
-		return ms_Singleton;
+		return msSingleton;
 	}
 	TerrainGlobalOptions& TerrainGlobalOptions::getSingleton(void)
 	{  
-		assert( ms_Singleton );  return ( *ms_Singleton );  
+		assert( msSingleton );  return ( *msSingleton );  
 	}
 	//---------------------------------------------------------------------
 	TerrainGlobalOptions::TerrainGlobalOptions()

Components/Terrain/src/OgreTerrainMaterialGeneratorA.cpp

 			else
 			{
 				outStream <<
-					"	fogVal = saturate(1 / (exp(oPos.z * fogParams.x)));\n";
+					"	fogVal = 1 - saturate(1 / (exp(oPos.z * fogParams.x)));\n";
 			}
 		}
 		

OgreMain/CMakeLists.txt

   list(APPEND LIBRARIES "${ZLIB_LIBRARIES}")
 endif ()
 
-list(APPEND LIBRARIES "${GLSL_Optimizer_LIBRARIES}")
-list(APPEND LIBRARIES "${HLSL2GLSL_LIBRARIES}")
+if (OGRE_CONFIG_ENABLE_GLES2_GLSL_OPTIMISER)
+  list(APPEND LIBRARIES "${GLSL_Optimizer_LIBRARIES}")
+endif ()
+
+if (OGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT)
+  list(APPEND LIBRARIES "${HLSL2GLSL_LIBRARIES}")
+endif ()
 
 set (TARGET_LINK_FLAGS "")
 

OgreMain/include/OgreAxisAlignedBox.h

 		Vector3 mMinimum;
 		Vector3 mMaximum;
 		Extent mExtent;
-		mutable Vector3* mpCorners;
+		mutable Vector3* mCorners;
 
 	public:
 		/*
 			NEAR_LEFT_TOP = 5,
 			NEAR_RIGHT_TOP = 4
 		} CornerEnum;
-		inline AxisAlignedBox() : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mpCorners(0)
+		inline AxisAlignedBox() : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mCorners(0)
 		{
 			// Default to a null box 
 			setMinimum( -0.5, -0.5, -0.5 );
 			setMaximum( 0.5, 0.5, 0.5 );
 			mExtent = EXTENT_NULL;
 		}
-		inline AxisAlignedBox(Extent e) : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mpCorners(0)
+		inline AxisAlignedBox(Extent e) : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mCorners(0)
 		{
 			setMinimum( -0.5, -0.5, -0.5 );
 			setMaximum( 0.5, 0.5, 0.5 );
 			mExtent = e;
 		}
 
-		inline AxisAlignedBox(const AxisAlignedBox & rkBox) : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mpCorners(0)
+		inline AxisAlignedBox(const AxisAlignedBox & rkBox) : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mCorners(0)
 
 		{
 			if (rkBox.isNull())
 				setExtents( rkBox.mMinimum, rkBox.mMaximum );
 		}
 
-		inline AxisAlignedBox( const Vector3& min, const Vector3& max ) : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mpCorners(0)
+		inline AxisAlignedBox( const Vector3& min, const Vector3& max ) : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mCorners(0)
 		{
 			setExtents( min, max );
 		}
 
 		inline AxisAlignedBox(
 			Real mx, Real my, Real mz,
-			Real Mx, Real My, Real Mz ) : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mpCorners(0)
+			Real Mx, Real My, Real Mz ) : mMinimum(Vector3::ZERO), mMaximum(Vector3::UNIT_SCALE), mCorners(0)
 		{
 			setExtents( mx, my, mz, Mx, My, Mz );
 		}
 
 		AxisAlignedBox& operator=(const AxisAlignedBox& rhs)
 		{
-			// Specifically override to avoid copying mpCorners
+			// Specifically override to avoid copying mCorners
 			if (rhs.isNull())
 				setNull();
 			else if (rhs.isInfinite())
 
 		~AxisAlignedBox()
 		{
-			if (mpCorners)
-				OGRE_FREE(mpCorners, MEMCATEGORY_SCENE_CONTROL);
+			if (mCorners)
+				OGRE_FREE(mCorners, MEMCATEGORY_SCENE_CONTROL);
 		}
 
 
 			// Maximum Z face, starting with Max(all), then anticlockwise
 			//   around face (looking onto the face)
 			// Only for optimization/compatibility.
-			if (!mpCorners)
-				mpCorners = OGRE_ALLOC_T(Vector3, 8, MEMCATEGORY_SCENE_CONTROL);
+			if (!mCorners)
+				mCorners = OGRE_ALLOC_T(Vector3, 8, MEMCATEGORY_SCENE_CONTROL);
 
-			mpCorners[0] = mMinimum;
-			mpCorners[1].x = mMinimum.x; mpCorners[1].y = mMaximum.y; mpCorners[1].z = mMinimum.z;
-			mpCorners[2].x = mMaximum.x; mpCorners[2].y = mMaximum.y; mpCorners[2].z = mMinimum.z;
-			mpCorners[3].x = mMaximum.x; mpCorners[3].y = mMinimum.y; mpCorners[3].z = mMinimum.z;            
+			mCorners[0] = mMinimum;
+			mCorners[1].x = mMinimum.x; mCorners[1].y = mMaximum.y; mCorners[1].z = mMinimum.z;
+			mCorners[2].x = mMaximum.x; mCorners[2].y = mMaximum.y; mCorners[2].z = mMinimum.z;
+			mCorners[3].x = mMaximum.x; mCorners[3].y = mMinimum.y; mCorners[3].z = mMinimum.z;            
 
-			mpCorners[4] = mMaximum;
-			mpCorners[5].x = mMinimum.x; mpCorners[5].y = mMaximum.y; mpCorners[5].z = mMaximum.z;
-			mpCorners[6].x = mMinimum.x; mpCorners[6].y = mMinimum.y; mpCorners[6].z = mMaximum.z;
-			mpCorners[7].x = mMaximum.x; mpCorners[7].y = mMinimum.y; mpCorners[7].z = mMaximum.z;
+			mCorners[4] = mMaximum;
+			mCorners[5].x = mMinimum.x; mCorners[5].y = mMaximum.y; mCorners[5].z = mMaximum.z;
+			mCorners[6].x = mMinimum.x; mCorners[6].y = mMinimum.y; mCorners[6].z = mMaximum.z;
+			mCorners[7].x = mMaximum.x; mCorners[7].y = mMinimum.y; mCorners[7].z = mMaximum.z;
 
-			return mpCorners;
+			return mCorners;
 		}
 
 		/** gets the position of one of the corners

OgreMain/include/OgreBillboardSet.h

         /// Name of the material to use
         String mMaterialName;
         /// Pointer to the material to use
-        MaterialPtr mpMaterial;
+        MaterialPtr mMaterial;
 
         /// True if no billboards in this set have been resized - greater efficiency.
         bool mAllDefaultSize;
         Vector3 mCamPos;
 
         /// The vertex index data for all billboards in this set (1 set only)
-        //unsigned short* mpIndexes;
+        //unsigned short* mIndexes;
         IndexData* mIndexData;
 
         /// Flag indicating whether each billboard should be culled separately (default: false)

OgreMain/include/OgreBorderPanelOverlayElement.h

         ushort mPixelBottomBorderSize;
 
         String mBorderMaterialName;
-        MaterialPtr mpBorderMaterial;
+        MaterialPtr mBorderMaterial;
 
         // Render operation for the border area
         RenderOperation mRenderOp2;
             mUseIdentityProjection = true;
             mUseIdentityView = true;
         }
-        const MaterialPtr& getMaterial(void) const { return mParent->mpBorderMaterial; }
+        const MaterialPtr& getMaterial(void) const { return mParent->mBorderMaterial; }
         void getRenderOperation(RenderOperation& op) { op = mParent->mRenderOp2; }
         void getWorldTransforms(Matrix4* xform) const { mParent->getWorldTransforms(xform); }
         unsigned short getNumWorldTransforms(void) const { return 1; }

OgreMain/include/OgreCamera.h

         @param offset If supplied, the camera targets this point in local space of the target node
             instead of the origin of the target node. Good for fine tuning the look at point.
         */
-        void setAutoTracking(bool enabled, SceneNode* target = 0, 
+        void setAutoTracking(bool enabled, SceneNode* const target = 0, 
             const Vector3& offset = Vector3::ZERO);
 
 

OgreMain/include/OgreCodec.h

         typedef map< String, Codec* >::type CodecList; 
         /** A map that contains all the registered codecs.
         */
-        static CodecList ms_mapCodecs;
+        static CodecList msMapCodecs;
 
     public:
         class _OgrePrivate CodecData : public CodecAlloc
         */
         static void registerCodec( Codec *pCodec )
         {
-			CodecList::iterator i = ms_mapCodecs.find(pCodec->getType());
-			if (i != ms_mapCodecs.end())
+			CodecList::iterator i = msMapCodecs.find(pCodec->getType());
+			if (i != msMapCodecs.end())
 				OGRE_EXCEPT(Exception::ERR_DUPLICATE_ITEM, 
 					pCodec->getType() + " already has a registered codec. ", __FUNCTION__);
 
-            ms_mapCodecs[pCodec->getType()] = pCodec;
+            msMapCodecs[pCodec->getType()] = pCodec;
         }
 
 		/** Return whether a codec is registered already. 
 		*/
 		static bool isCodecRegistered( const String& codecType )
 		{
-			return ms_mapCodecs.find(codecType) != ms_mapCodecs.end();
+			return msMapCodecs.find(codecType) != msMapCodecs.end();
 		}
 
 		/** Unregisters a codec from the database.
         */
         static void unRegisterCodec( Codec *pCodec )
         {
-            ms_mapCodecs.erase(pCodec->getType());
+            msMapCodecs.erase(pCodec->getType());
         }
 
         /** Gets the iterator for the registered codecs. */
         static CodecIterator getCodecIterator(void)
         {
-            return CodecIterator(ms_mapCodecs.begin(), ms_mapCodecs.end());
+            return CodecIterator(msMapCodecs.begin(), msMapCodecs.end());
         }
 
         /** Gets the file extension list for the registered codecs. */

OgreMain/include/OgreCompositorInstance.h

 		void setScheme(const String& schemeName, bool reuseTextures = true);
 
 		/// Returns the name of the scheme this compositor is using
-		const String& getScheme() const { return mActiveScheme; }
+		const String& getScheme() const { return mTechnique ? mTechnique->getSchemeName() : StringUtil::BLANK; }
 
 		/** Notify this instance that the primary surface has been resized. 
 		@remarks
         
         /// Previous instance (set by chain)
         CompositorInstance *mPreviousInstance;
-
-		/// The scheme which is being used in this instance
-		String mActiveScheme;
 		
 		/** Collect rendering passes. Here, passes are converted into render target operations
 			and queued with queueRenderSystemOp.

OgreMain/include/OgreDataStream.h

 	{
 	protected:
 		/// Reference to source stream (read)
-		std::istream* mpInStream;
+		std::istream* mInStream;
 		/// Reference to source file stream (read-only)
-		std::ifstream* mpFStreamRO;
+		std::ifstream* mFStreamRO;
 		/// Reference to source file stream (read-write)
-		std::fstream* mpFStream;
+		std::fstream* mFStream;
         bool mFreeOnClose;	
 
 		void determineAccess();

OgreMain/include/OgreDefaultHardwareBufferManager.h

     class _OgreExport DefaultHardwareVertexBuffer : public HardwareVertexBuffer 
     {
 	protected:
-		unsigned char* mpData;
+		unsigned char* mData;
         /** See HardwareBuffer. */
         void* lockImpl(size_t offset, size_t length, LockOptions options);
         /** See HardwareBuffer. */
     class _OgreExport DefaultHardwareIndexBuffer : public HardwareIndexBuffer
     {
 	protected:
-		unsigned char* mpData;
+		unsigned char* mData;
         /** See HardwareBuffer. */
         void* lockImpl(size_t offset, size_t length, LockOptions options);
         /** See HardwareBuffer. */

OgreMain/include/OgreDeflate.h

 		DataStreamPtr mCompressedStream;
 		DataStreamPtr mTmpWriteStream;
 		String mTempFileName;
-		z_stream* mpZStream;
+		z_stream* mZStream;
 		size_t mCurrentPos;
 		
 		// Cache for read data in case skipping around
 		StaticCache<16 * OGRE_STREAM_TEMP_SIZE> mReadCache;
 		
 		// Intermediate buffer for read / write
-		unsigned char *mpTmp;
+		unsigned char *mTmp;
 		
 		// Whether the underlying stream is valid compressed data
 		bool mIsCompressedValid;

OgreMain/include/OgreDualQuaternion.h

     (Object-oriented Graphics Rendering Engine)
 For the latest info, see http://www.ogre3d.org/
 
-Copyright (c) 2000-2009 Torus Knot Software Ltd
+Copyright (c) 2000-2011 Torus Knot Software Ltd
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal

OgreMain/include/OgreDynLib.h

     protected:
 
         /// Handle to the loaded library.
-        DYNLIB_HANDLE m_hInst;
+        DYNLIB_HANDLE mInst;
     };
 	/** @} */
 	/** @} */

OgreMain/include/OgreEntity.h

 		initialised from the Mesh object.
 		*/
 		AnimationState* getAnimationState(const String& name) const;
+        /** Returns whether the AnimationState with the given name exists. */
+        bool hasAnimationState(const String& name) const;
 		/** For entities based on animated meshes, gets the AnimationState objects for all animations.
 		@returns
 		In case the entity is animated, this functions returns the pointer to a AnimationStateSet

OgreMain/include/OgreExternalTextureSourceManager.h

 		void setCurrentPlugIn( const String& sTexturePlugInType );
 
 		/** Returns currently selected plugin, may be null if none selected */
-		ExternalTextureSource* getCurrentPlugIn( void ) const { return mpCurrExternalTextureSource; }
+		ExternalTextureSource* getCurrentPlugIn( void ) const { return mCurrExternalTextureSource; }
 	
 		/** Calls the destroy method of all registered plugins... 
 		Only the owner plugin should perform the destroy action. */
         static ExternalTextureSourceManager* getSingletonPtr(void);
 	protected:
 		//The current texture controller selected
-		ExternalTextureSource* mpCurrExternalTextureSource;
+		ExternalTextureSource* mCurrExternalTextureSource;
 		
         // Collection of loaded texture System PlugIns, keyed by registered type
         typedef map< String, ExternalTextureSource*>::type TextureSystemList;

OgreMain/include/OgreFileSystem.h

 		/// resource locations. The default is true (ignore hidden files).
 		static void setIgnoreHidden(bool ignore)
 		{
-			ms_IgnoreHidden = ignore;
+			msIgnoreHidden = ignore;
 		}
 
 		/// Get whether hidden files are ignored during filesystem enumeration.
 		static bool getIgnoreHidden()
 		{
-			return ms_IgnoreHidden;
+			return msIgnoreHidden;
 		}
 
-		static bool ms_IgnoreHidden;
+		static bool msIgnoreHidden;
     };
 
     /** Specialisation of ArchiveFactory for FileSystem files. */

OgreMain/include/OgreFont.h

 		CodePointMap mCodePointMap;
 
         /// The material which is generated for this font
-        MaterialPtr mpMaterial;
+        MaterialPtr mMaterial;
 
 		/// Texture pointer
 		TexturePtr mTexture;
         */
         inline const MaterialPtr& getMaterial() const
         {
-            return mpMaterial;
+            return mMaterial;
         }
         /** Gets the material generated for this font, as a weak reference. 
         @remarks
         */
         inline const MaterialPtr& getMaterial()
         {
-            return mpMaterial;
+            return mMaterial;
         }
         /** Sets whether or not the colour of this font is antialiased as it is generated
             from a true type font.

OgreMain/include/OgreHardwareBuffer.h

 			size_t mLockSize;
 			bool mSystemMemory;
             bool mUseShadowBuffer;
-            HardwareBuffer* mpShadowBuffer;
+            HardwareBuffer* mShadowBuffer;
             bool mShadowUpdated;
             bool mSuppressHardwareUpdate;
     		
 		    /// Constructor, to be called by HardwareBufferManager only
             HardwareBuffer(Usage usage, bool systemMemory, bool useShadowBuffer) 
 				: mUsage(usage), mIsLocked(false), mSystemMemory(systemMemory), 
-                mUseShadowBuffer(useShadowBuffer), mpShadowBuffer(NULL), mShadowUpdated(false), 
+                mUseShadowBuffer(useShadowBuffer), mShadowBuffer(NULL), mShadowUpdated(false), 
                 mSuppressHardwareUpdate(false) 
             {
                 // If use shadow buffer, upgrade to WRITE_ONLY on hardware side
                         mShadowUpdated = true;
                     }
 
-                    ret = mpShadowBuffer->lock(offset, length, options);
+                    ret = mShadowBuffer->lock(offset, length, options);
                 }
                 else
                 {
                 assert(isLocked() && "Cannot unlock this buffer, it is not locked!");
 
 				// If we used the shadow buffer this time...
-                if (mUseShadowBuffer && mpShadowBuffer->isLocked())
+                if (mUseShadowBuffer && mShadowBuffer->isLocked())
                 {
-                    mpShadowBuffer->unlock();
+                    mShadowBuffer->unlock();
                     // Potentially update the 'real' buffer from the shadow buffer
                     _updateFromShadow();
                 }
                 if (mUseShadowBuffer && mShadowUpdated && !mSuppressHardwareUpdate)
                 {
                     // Do this manually to avoid locking problems
-                    const void *srcData = mpShadowBuffer->lockImpl(
+                    const void *srcData = mShadowBuffer->lockImpl(
     					mLockStart, mLockSize, HBL_READ_ONLY);
 					// Lock with discard if the whole buffer was locked, otherwise normal
 					LockOptions lockOpt;
 					// Copy shadow to real
                     memcpy(destData, srcData, mLockSize);
                     this->unlockImpl();
-                    mpShadowBuffer->unlockImpl();
+                    mShadowBuffer->unlockImpl();
                     mShadowUpdated = false;
                 }
             }
 			bool hasShadowBuffer(void) const { return mUseShadowBuffer; }
             /// Returns whether or not this buffer is currently locked.
             bool isLocked(void) const { 
-                return mIsLocked || (mUseShadowBuffer && mpShadowBuffer->isLocked()); 
+                return mIsLocked || (mUseShadowBuffer && mShadowBuffer->isLocked()); 
             }
             /// Pass true to suppress hardware upload of shadow buffer changes
             void suppressHardwareUpdate(bool suppress) {

OgreMain/include/OgreHardwareOcclusionQuery.h

 	/**
 	  * Starts the hardware occlusion query
 	  * @Remarks	Simple usage: Create one or more OcclusionQuery object one per outstanding query or one per tested object 
-	  *				OcclusionQuery* m_pOcclusionQuery;
-	  *				createOcclusionQuery( &m_pOcclusionQuery );
+	  *				OcclusionQuery* mOcclusionQuery;
+	  *				createOcclusionQuery( &mOcclusionQuery );
 	  *				In the rendering loop:
 	  *				Draw all occluders
-	  *				m_pOcclusionQuery->startOcclusionQuery();
+	  *				mOcclusionQuery->startOcclusionQuery();
 	  *				Draw the polygons to be tested
-	  *				m_pOcclusionQuery->endOcclusionQuery();
+	  *				mOcclusionQuery->endOcclusionQuery();
 	  *
 	  *				Results must be pulled using:
-	  *				UINT	m_uintNumberOfPixelsVisable;
-	  *				pullOcclusionQuery( &m_dwNumberOfPixelsVisable );
+	  *				UINT	mNumberOfPixelsVisable;
+	  *				pullOcclusionQuery( &mNumberOfPixelsVisable );
 	  *			
 	  */
 	virtual void beginOcclusionQuery() = 0;

OgreMain/include/OgreHardwareVertexBuffer.h

             vertex declaration. <b>Please read the information in VertexDeclaration about
 	    the importance of ordering and structure for compatibility with older D3D drivers</b>.
 	    @param source The binding index of HardwareVertexBuffer which will provide the source for this element.
-			See VertexBufferBindingState for full information.
+			See VertexBufferBinding for full information.
         @param offset The offset in bytes where this element is located in the buffer
         @param theType The data format of the element (3 floats, a colour etc)
         @param semantic The meaning of the data (position, normal, diffuse colour etc)
         vertex declaration. <b>Please read the information in VertexDeclaration about
         the importance of ordering and structure for compatibility with older D3D drivers</b>.
         @param source The binding index of HardwareVertexBuffer which will provide the source for this element.
-        See VertexBufferBindingState for full information.
+        See VertexBufferBinding for full information.
         @param offset The offset in bytes where this element is located in the buffer
         @param theType The data format of the element (3 floats, a colour etc)
         @param semantic The meaning of the data (position, normal, diffuse colour etc)

OgreMain/include/OgreImage.h

             @param
 				Height of image
 			@param
-                Image Depth (in 3d images, numbers of layers, otherwhise 1)
+                Image Depth (in 3d images, numbers of layers, otherwise 1)
             @param
 				Pixel Format
             @param
                 if memory associated with this buffer is to be destroyed
 				with the Image object. Note: it's important that if you set
 				this option to true, that you allocated the memory using OGRE_ALLOC_T
-				with a category of MEMCATEGORY_GENERAL ensure the freeing of memory 
+				with a category of MEMCATEGORY_GENERAL to ensure the freeing of memory 
 				matches up.
 			@param
 				the number of faces the image data has inside (6 for cubemaps, 1 otherwise)
 			@remarks 
 				The size of the buffer must be numFaces*PixelUtil::getMemorySize(width, height, depth, format)
          */
-		Image& loadDynamicImage( uchar* pData, size_t uWidth, size_t uHeight, 
+		Image& loadDynamicImage( uchar* data, size_t width, size_t height, 
 							size_t depth,
-							 PixelFormat eFormat, bool autoDelete = false, 
+							 PixelFormat format, bool autoDelete = false, 
 							 size_t numFaces = 1, size_t numMipMaps = 0);
 		
 		/** Stores a pointer to raw data in memory. The pixel format has to be specified.
                  The memory associated with this buffer is NOT destroyed with the
                  Image object.
 			@remarks This function is deprecated; one should really use the
-				Image::loadDynamicImage(pData, width, height, depth, format, ...) to be compatible
+				Image::loadDynamicImage(data, width, height, depth, format, ...) to be compatible
 				with future Ogre versions.
          */
- 		Image& loadDynamicImage( uchar* pData, size_t uWidth,
-								 size_t uHeight, PixelFormat eFormat)
+ 		Image& loadDynamicImage( uchar* data, size_t width,
+								 size_t height, PixelFormat format)
 		{
-			return loadDynamicImage(pData, uWidth, uHeight, 1, eFormat);
+			return loadDynamicImage(data, width, height, 1, format);
 		}
 		/** Loads raw data from a stream. See the function
 			loadDynamicImage for a description of the parameters.
         */
         Image & loadRawData( 
             DataStreamPtr& stream, 
-            size_t uWidth, size_t uHeight, size_t uDepth,
-            PixelFormat eFormat,
+            size_t width, size_t height, size_t depth,
+            PixelFormat format,
 			size_t numFaces = 1, size_t numMipMaps = 0);
         /** Loads raw data from a stream. The pixel format has to be specified. 
 			@remarks This function is deprecated; one should really use the
         */
         Image & loadRawData( 
             DataStreamPtr& stream, 
-            size_t uWidth, size_t uHeight, 
-            PixelFormat eFormat )
+            size_t width, size_t height, 
+            PixelFormat format )
 		{
-			return loadRawData(stream, uWidth, uHeight, 1, eFormat);
+			return loadRawData(stream, width, height, 1, format);
 		}
 
         /** Loads an image file.
             @remarks
                 This method loads an image into memory. Any format for which 
-				and associated ImageCodec is registered can be loaded. 
+				an associated ImageCodec is registered can be loaded. 
 				This can include complex formats like DDS with embedded custom 
 				mipmaps, cube faces and volume textures.
                 The type can be determined by calling getFormat().             
             @param
-                strFileName Name of a file file to load.
+                filename Name of an image file to load.
             @param
                 groupName Name of the resource group to search for the image
             @note
                 The memory associated with this buffer is destroyed with the
                 Image object.
         */
-        Image & load( const String& strFileName, const String& groupName );
+        Image & load( const String& filename, const String& groupName );
 
         /** Loads an image file from a stream.
             @remarks
                 method except it loads the image from a DataStream object. 
 				This DataStream is expected to contain the 
                 encoded data as it would be held in a file. 
-                Any format for which and associated ImageCodec is registered 
+                Any format for which an associated ImageCodec is registered 
 				can be loaded. 
 				This can include complex formats like DDS with embedded custom 
 				mipmaps, cube faces and volume textures.
                 codec to use. Can be left blank if the stream data includes
 				a header to identify the data.
             @see
-                Image::load( const String& strFileName )
+                Image::load( const String& filename )
         */
 		Image & load(DataStreamPtr& stream, const String& type = StringUtil::BLANK );
 
 
     protected:
         // The width of the image in pixels
-        size_t m_uWidth;
+	size_t mWidth;
         // The height of the image in pixels
-        size_t m_uHeight;
+	size_t mHeight;
         // The depth of the image
-        size_t m_uDepth;
+	size_t mDepth;
         // The size of the image buffer
-        size_t m_uSize;
+	size_t mBufSize;
         // The number of mipmaps the image contains
-        size_t m_uNumMipmaps;
+	size_t mNumMipmaps;
         // Image specific flags.
-        int m_uFlags;
+	int mFlags;
 
         // The pixel format of the image
-        PixelFormat m_eFormat;
+	PixelFormat mFormat;
 
         // The number of bytes per pixel
-        uchar m_ucPixelSize;
-        uchar* m_pBuffer;
+	uchar mPixelSize;
+	uchar* mBuffer;
 
 		// A bool to determine if we delete the buffer or the calling app does
-		bool m_bAutoDelete;
+		bool mAutoDelete;
     };
 
 	typedef vector<Image*>::type ImagePtrList;

OgreMain/include/OgreInstanceBatch.h

 		const Ogre::MeshPtr& _getMeshReference(void) const { return mMeshReference; }
 
 		/** Returns true if it can not create more InstancedEntities
-			(Num InstancedEntities == m_instancesPerBatch)
+			(Num InstancedEntities == mInstancesPerBatch)
 		*/
 		bool isBatchFull(void) const { return mUnusedEntities.empty(); }
 

OgreMain/include/OgreInstancedEntity.h

 #define __InstancedEntity_H__
 
 #include "OgreMovableObject.h"
+#include "OgreNode.h"
 
 namespace Ogre
 {
 
 		/** Called by InstanceBatch in <i>his</i> _updateRenderQueue to tell us we need
 			to calculate our bone matrices.
-			@remarks Assumes it has a skeleton (m_skeletonInstance != 0)
+			@remarks Assumes it has a skeleton (mSkeletonInstance != 0)
 			@returns true if something was actually updated
 		*/
 		virtual bool _updateAnimation(void);

OgreMain/include/OgreInstancedGeometry.h

 					}
 				}
 			}
+
+			void _initGeometryBucket(const VertexData* vData, const IndexData* iData);
+			void _initGeometryBucket(GeometryBucket* bucket);
+
 		public:
 			GeometryBucket(MaterialBucket* parent, const String& formatString, 
 				const VertexData* vData, const IndexData* iData);
+			GeometryBucket(const String& name, MaterialBucket* parent, const String& formatString, 
+				const VertexData* vData, const IndexData* iData);
 			GeometryBucket(MaterialBucket* parent,const String& formatString,GeometryBucket*bucket);
+			GeometryBucket(const String& name, MaterialBucket* parent,const String& formatString,GeometryBucket*bucket);
 			virtual ~GeometryBucket();
 			MaterialBucket* getParent(void) { return mParent; }
 			Real getBoundingRadius(void) const;

OgreMain/include/OgreLog.h

 	class _OgreExport Log : public LogAlloc
     {
     protected:
-        std::ofstream	mfpLog;
+        std::ofstream	mLog;
         LoggingLevel	mLogLevel;
         bool			mDebugOut;
         bool			mSuppressFile;

OgreMain/include/OgreMath.h

 		template <typename T>
 		static T Clamp(T val, T minval, T maxval)
 		{
-			assert (minval < maxval && "Invalid clamp range");
+			assert (minval <= maxval && "Invalid clamp range");
 			return std::max(std::min(val, maxval), minval);
 		}
 

OgreMain/include/OgreMatrix3.h

         Real SpectralNorm () const;
 
         // matrix must be orthonormal
-        void ToAxisAngle (Vector3& rkAxis, Radian& rfAngle) const;
-		inline void ToAxisAngle (Vector3& rkAxis, Degree& rfAngle) const {
+        void ToAngleAxis (Vector3& rkAxis, Radian& rfAngle) const;
+		inline void ToAngleAxis (Vector3& rkAxis, Degree& rfAngle) const {
 			Radian r;
-			ToAxisAngle ( rkAxis, r );
+			ToAngleAxis ( rkAxis, r );
 			rfAngle = r;
 		}
-        void FromAxisAngle (const Vector3& rkAxis, const Radian& fRadians);
+        void FromAngleAxis (const Vector3& rkAxis, const Radian& fRadians);
 
         // The matrix must be orthonormal.  The decomposition is yaw*pitch*roll
         // where yaw is rotation about the Up vector, pitch is rotation about the
         bool QLAlgorithm (Real afDiag[3], Real afSubDiag[3]);
 
         // support for singular value decomposition
-        static const Real ms_fSvdEpsilon;
-        static const unsigned int ms_iSvdMaxIterations;
+        static const Real msSvdEpsilon;
+        static const unsigned int msSvdMaxIterations;
         static void Bidiagonalize (Matrix3& kA, Matrix3& kL,
             Matrix3& kR);
         static void GolubKahanStep (Matrix3& kA, Matrix3& kL,

OgreMain/include/OgreOverlayElement.h

         Real mWidth;
         Real mHeight;
         String mMaterialName;
-        MaterialPtr mpMaterial;
+        MaterialPtr mMaterial;
         DisplayString mCaption;
         ColourValue mColour;
         Rectangle mClippingRegion;

OgreMain/include/OgreParticleEmitter.h

         static EmitterCommands::CmdColourRangeStart msColourRangeStartCmd;
         static EmitterCommands::CmdColourRangeEnd msColourRangeEndCmd;
         static EmitterCommands::CmdDirection msDirectionCmd;
+        static EmitterCommands::CmdUp msUpCmd;
         static EmitterCommands::CmdEmissionRate msEmissionRateCmd;
         static EmitterCommands::CmdMaxTTL msMaxTTLCmd;
         static EmitterCommands::CmdMaxVelocity msMaxVelocityCmd;
         String mType;
         /// Base direction of the emitter, may not be used by some emitters
         Vector3 mDirection;
-        // Notional up vector, just used to speed up generation of variant directions
+        // Notional up vector, used to speed up generation of variant directions, and also to orient some emitters.
         Vector3 mUp;
         /// Angle around direction which particles may be emitted, internally radians but angleunits for interface
         Radian mAngle;
             emit in all directions will ignore this parameter). They may not emit exactly along this
             vector for every particle, many will introduce a random scatter around this vector using 
             the angle property.
+        @note 
+			This resets the up vector.
         @param direction
             The base direction for particles emitted.
         */
         /** Returns the base direction of the emitter. */
         virtual const Vector3& getDirection(void) const;
 
+        /** Sets the notional up vector of the emitter
+        @remarks
+			Many emitters emit particles from within a region, and for some that region is not
+			circularly symmetric about the emitter direction. The up vector allows such emitters
+			to be orientated about the direction vector.
+        @param up
+            The base direction for particles emitted. It must be perpendicular to the direction vector.
+        */
+        virtual void setUp(const Vector3& up);
+
+        /** Returns the up vector of the emitter. */
+        virtual const Vector3& getUp(void) const;
+
         /** Sets the maximum angle away from the emitter direction which particle will be emitted.
         @remarks
             Whilst the direction property defines the general direction of emission for particles, 

OgreMain/include/OgreParticleEmitterCommands.h

             String doGet(const void* target) const;
             void doSet(void* target, const String& val);
         };
+        
+        /// Command object for particle emitter  - see ParamCommand