Commits

David Rogers committed 8d3b960 Merge

Merge 1.8 into default

Comments (0)

Files changed (336)

 3e9ed7c712e179a9a3f8434117d32b6ce4a15762 v1-7-2
 548833a16388faee9a9701829f375767225a90e2 v1-7-3
 123466e1905576be1e4cdee82de0f2782d73885e v1-8-0RC1
+3467d92e149c044b3c9a3527827f49f4ef9ae604 v1-7-4

CMake/Dependencies.cmake

 if (APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS)
 	set(Boost_COMPILER "-xgcc42")
 endif()
-set(Boost_ADDITIONAL_VERSIONS "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" )
+set(Boost_ADDITIONAL_VERSIONS "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" )
 # Components that need linking (NB does not include header-only components like bind)
 set(OGRE_BOOST_COMPONENTS thread date_time)
 find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)

CMake/Packages/FindFreetype.cmake

   FREETYPE_INCLUDE_DIR
 )
 
-set(FREETYPE_LIBRARY_NAMES freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)
 
 use_pkgconfig(FREETYPE_PKGC freetype2)

CMake/Packages/FindOGRE.cmake

 endif ()
 
 
-if(APPLE)
+if(APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
 	set(OGRE_LIBRARY_NAMES "Ogre${OGRE_LIB_SUFFIX}")
 else()
     set(OGRE_LIBRARY_NAMES "OgreMain${OGRE_LIB_SUFFIX}")
 set(OGRE_PREFIX_WATCH ${OGRE_PREFIX_PATH} ${OGRE_PREFIX_SOURCE} ${OGRE_PREFIX_BUILD})
 clear_if_changed(OGRE_PREFIX_WATCH ${OGRE_RESET_VARS})
 
-# try to locate Ogre via pkg-config
-use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")
+if(NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+	# try to locate Ogre via pkg-config
+	use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")
 
-if(NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
-  # try to find framework on OSX
-  findpkg_framework(OGRE)
+	# try to find framework on OSX
+	findpkg_framework(OGRE)
 else()
 	set(OGRE_LIBRARY_FWK "")
 endif()

CMake/Packages/FindiOSSDK.cmake

 # construct search paths
 set(iOSSDK_PREFIX_PATH ${iOSSDK_HOME} $ENV{iOSSDK_HOME}
   ${OGRE_HOME} $ENV{OGRE_HOME})
-create_search_paths(/Developer/Platforms)
+create_search_paths(/Developer/Platforms /Applications/Xcode.app/Contents/Developer/Platforms)
 # redo search if prefix path changed
 clear_if_changed(iOSSDK_PREFIX_PATH
   iOSSDK_LIBRARY_FWK
 
 #findpkg_framework(UIKit)
 
-find_path(iOSSDK_INCLUDE_DIR iPhoneOS.platform /Developer/Platforms)
+find_path(iOSSDK_INCLUDE_DIR iPhoneOS.platform /Developer/Platforms /Applications/Xcode.app/Contents/Developer/Platforms)
 
 if (iOSSDK_INCLUDE_DIR)
   unset(iOSSDK_INCLUDE_DIR)

CMake/Templates/DemoLicense.rtf

Binary file modified.

CMake/Templates/SDK_CMakeLists.txt.in

 #####################################################################
 
 # Set compiler specific build flags
-if (CMAKE_COMPILER_IS_GNUCXX)
+if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
   add_definitions(-msse)
 endif ()
 if (APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS)
 		# search names with "lib". This is the workaround.
 		set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "")
 	endif ()
-	set(Boost_ADDITIONAL_VERSIONS "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.46.1" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" )
+	set(Boost_ADDITIONAL_VERSIONS "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.46.1" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" )
 	# Components that need linking (NB does not include header-only components like bind)
 	set(OGRE_BOOST_COMPONENTS thread date_time)
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 else()
 	set(BOOST_LIBRARYDIR "${CMAKE_CURRENT_SOURCE_DIR}/lib/release")
 	set(Boost_USE_STATIC_LIBS TRUE)
-	set(Boost_ADDITIONAL_VERSIONS "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.46.1" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" )
+	set(Boost_ADDITIONAL_VERSIONS "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.46.1" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" )
 	# Components that need linking (NB does not include header-only components like bind)
 	set(OGRE_BOOST_COMPONENTS thread date_time)
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)

CMake/Templates/SDK_Samples_CMakeLists.txt.in

   add_subdirectory(Fresnel)
   add_subdirectory(Isosurf)
   add_subdirectory(ParticleGS)
+  add_subdirectory(SSAO)
 endif ()
 
   # Add browser last

CMake/Utils/OgreConfigTargets.cmake

File contents unchanged.

CMake/Utils/PrecompiledHeader.cmake

       PPROPERTIES COMPILE_FLAGS /Yc"${HEADER}"
 	)
     
-  elseif (CMAKE_COMPILER_IS_GNUCXX)
+  elseif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
     # disabled because it seems to increase compile time
     ## this is some serious hack... we definitely need native 
     ## support in CMake for this!
 endif ()
 
 # Set compiler specific build flags
-if (CMAKE_COMPILER_IS_GNUCXX)
+if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
   check_cxx_compiler_flag(-msse OGRE_GCC_HAS_SSE)
   if (OGRE_GCC_HAS_SSE)
     add_definitions(-msse)
   endif ()
+  # This is a set of sensible warnings that provide meaningful output
+  add_definitions(-Wno-deprecated -Wall -Wctor-dtor-privacy -Winit-self -Wno-overloaded-virtual -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -pedantic -Wshadow -Wno-unused-but-set-parameter -Wno-missing-field-initializers -Wno-long-long)
 endif ()
 if (MSVC)
   if (CMAKE_BUILD_TOOL STREQUAL "nmake")
   add_definitions(-D_WIN32_WINNT=0x0500)
 endif ()
 
-if (CMAKE_COMPILER_IS_GNUCXX AND NOT MINGW)
+if ((CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) AND NOT MINGW)
   # Test for GCC visibility
   include(CheckCXXCompilerFlag)
   check_cxx_compiler_flag(-fvisibility=hidden OGRE_GCC_VISIBILITY)
   if(OGRE_PLATFORM_X64 AND NOT APPLE)
     add_definitions(-fPIC)
   endif()  
-endif (CMAKE_COMPILER_IS_GNUCXX AND NOT MINGW)
+endif ((CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) AND NOT MINGW)
 
 # determine system endianess
 if (MSVC)
   set(CMAKE_OSX_DEPLOYMENT_TARGET "")
   set(CMAKE_EXE_LINKER_FLAGS "-framework Foundation -framework CoreGraphics -framework QuartzCore -framework UIKit")
   set(XCODE_ATTRIBUTE_SDKROOT iphoneos)
+  set(XCODE_ATTRIBUTE_GCC_UNROLL_LOOPS "YES")
+  set(XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")
+  set(XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
   set(OGRE_BUILD_RENDERSYSTEM_GLES TRUE CACHE BOOL "Forcing OpenGL ES RenderSystem for iOS" FORCE)
   set(OGRE_BUILD_RENDERSYSTEM_GLES2 TRUE CACHE BOOL "Forcing OpenGL ES 2 RenderSystem for iOS" FORCE)
   set(OGRE_STATIC TRUE CACHE BOOL "Forcing static build for iOS" FORCE)

Components/RTShaderSystem/include/OgreShaderFFPColour.h

 		SF_PS_INPUT_DIFFUSE		= 1 << 5,
 		SF_PS_INPUT_SPECULAR	= 1 << 6,
 		SF_PS_OUTPUT_DIFFUSE	= 1 << 7,
-		SF_PS_OUTPUT_SPECULAR	= 1 << 8,
+		SF_PS_OUTPUT_SPECULAR	= 1 << 8
 	};
 
 // Interface.

Components/RTShaderSystem/include/OgreShaderFFPRenderState.h

 	FFP_VS_LIGHTING						= 300,
 	FFP_VS_TEXTURING					= 400,		
 	FFP_VS_FOG							= 500,	
-	FFP_VS_POST_PROCESS					= 2000,
+	FFP_VS_POST_PROCESS					= 2000
 };
 
 // Fixed Function fragment shader stages.
 	FFP_PS_TEXTURING					= 200,	
 	FFP_PS_COLOUR_END					= 300,
 	FFP_PS_FOG							= 400,
-	FFP_PS_POST_PROCESS					= 500,
+	FFP_PS_POST_PROCESS					= 500
 };
 
 // Fixed Function generic stages.
 	FFP_LIGHTING						= 300,
 	FFP_TEXTURING						= 400,
 	FFP_FOG								= 500,
-	FFP_POST_PROCESS					= 600,
+	FFP_POST_PROCESS					= 600
 };
 
 // Fixed Function Library: Common functions

Components/RTShaderSystem/include/OgreShaderParameter.h

 	static UniformParameterPtr	createSampler			(GpuConstantType type, int index);
 	static UniformParameterPtr	createSampler1D			(int index);
 	static UniformParameterPtr	createSampler2D			(int index);
+	static UniformParameterPtr	createSampler2DArray	(int index);
 	static UniformParameterPtr	createSampler3D			(int index);
 	static UniformParameterPtr	createSamplerCUBE		(int index);	
 

Components/RTShaderSystem/include/OgreShaderPrerequisites.h

 {	
 	VSOCP_LOW		= 0,		// VS Outputs will be compacted just in case the maximum slot count exceeded.
 	VSOCP_MEDIUM	= 1,		// VS Outputs will be compacted always without parameter splits.
-	VSOCP_HIGH		= 2,		// VS Outputs will be compacted always including parameter splits.
+	VSOCP_HIGH		= 2			// VS Outputs will be compacted always including parameter splits.
 };
 
 enum SkinningType

Components/RTShaderSystem/src/OgreRTShaderSystem.cpp

-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-(Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org
-
-Copyright (c) 2000-2012 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
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
------------------------------------------------------------------------------
-*/
-#include "OgreRTShaderSystem.h"
-
-namespace Ogre {
-
-//-----------------------------------------------------------------------
-template<> 
-RTShader::RTShaderSystem* Singleton<RTShader::RTShaderSystem>::msSingleton = 0;
-
-namespace RTShader {
-
-/************************************************************************/
-/*                                                                      */
-/************************************************************************/
-
-Ogre::Technique* RTShaderSystem::ShaderGeneratorTechniqueResolverListener::handleSchemeNotFound( unsigned short schemeIndex, const Ogre::String& schemeName, Ogre::Material* originalMaterial, unsigned short lodIndex, const Ogre::Renderable* rend )
-{
-  Ogre::Technique* generatedTech = NULL;
-
-  // Case this is the default shader generator scheme.
-  if (schemeName == ShaderGenerator::DEFAULT_SCHEME_NAME)
-  {
-    bool techniqueCreated;
-
-    // Create shader generated technique for this material.
-    techniqueCreated = mShaderGenerator->createShaderBasedTechnique(
-      originalMaterial->getName(), 
-      Ogre::MaterialManager::DEFAULT_SCHEME_NAME, 
-      schemeName);	
-
-    // Case technique registration succeeded.
-    if (techniqueCreated)
-    {
-      // Force creating the shaders for the generated technique.
-      mShaderGenerator->validateMaterial(schemeName, originalMaterial->getName());
-
-      // Grab the generated technique.
-      Ogre::Material::TechniqueIterator itTech = originalMaterial->getTechniqueIterator();
-
-      while (itTech.hasMoreElements())
-      {
-        Ogre::Technique* curTech = itTech.getNext();
-
-        if (curTech->getSchemeName() == schemeName)
-        {
-          generatedTech = curTech;
-          break;
-        }
-      }				
-    }
-  }
-
-  return generatedTech;
-}
-
-//-----------------------------------------------------------------------
-RTShaderSystem::ShaderGeneratorTechniqueResolverListener::ShaderGeneratorTechniqueResolverListener( ShaderGenerator* pShaderGenerator )
-{
-  mShaderGenerator = pShaderGenerator;
-}
-
-//-----------------------------------------------------------------------
-RTShaderSystem::RTShaderSystem() 
-  : mShaderGenerator(0), mMaterialMgrListener(0)
-{
-
-}
-
-//-----------------------------------------------------------------------
-RTShaderSystem::~RTShaderSystem()
-{
-
-}
-
-//-----------------------------------------------------------------------
-size_t RTShaderSystem::getVertexShaderCount() const
-{
-  return mShaderGenerator->getVertexShaderCount();
-}
-
-//-----------------------------------------------------------------------
-size_t RTShaderSystem::getFragmentShaderCount() const
-{
-  return mShaderGenerator->getFragmentShaderCount();
-}
-
-//-----------------------------------------------------------------------
-bool RTShaderSystem::initializeRTShaderSystem( Ogre::SceneManager* sceneMgr )
-{
-  if (ShaderGenerator::initialize())
-  {
-    mShaderGenerator = ShaderGenerator::getSingletonPtr();
-
-    mShaderGenerator->addSceneManager(sceneMgr);
-
-    // Setup core libraries and shader cache path.
-    Ogre::StringVector groupVector = Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
-    Ogre::StringVector::iterator itGroup = groupVector.begin();
-    Ogre::StringVector::iterator itGroupEnd = groupVector.end();
-    Ogre::String shaderCoreLibsPath;
-    Ogre::String shaderCachePath;
-
-    for (; itGroup != itGroupEnd; ++itGroup)
-    {
-      Ogre::ResourceGroupManager::LocationList resLocationsList = Ogre::ResourceGroupManager::getSingleton().getResourceLocationList(*itGroup);
-      Ogre::ResourceGroupManager::LocationList::iterator it = resLocationsList.begin();
-      Ogre::ResourceGroupManager::LocationList::iterator itEnd = resLocationsList.end();
-      bool coreLibsFound = false;
-
-      // Try to find the location of the core shader lib functions and use it
-      // as shader cache path as well - this will reduce the number of generated files
-      // when running from different directories.
-      for (; it != itEnd; ++it)
-      {
-        if ((*it)->archive->getName().find("RTShaderLib") != Ogre::String::npos)
-        {
-          shaderCoreLibsPath = (*it)->archive->getName() + "/";
-          shaderCachePath = shaderCoreLibsPath;
-          coreLibsFound = true;
-          break;
-        }
-      }
-      // Core libs path found in the current group.
-      if (coreLibsFound) 
-        break; 
-    }
-
-    // Core shader libs not found -> shader generating will fail.
-    if (shaderCoreLibsPath.empty())			
-      return false;			
-
-#ifdef _RTSS_WRITE_SHADERS_TO_DISK
-    // Set shader cache path.
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
-    shaderCachePath = Ogre::macCachePath();
-#endif
-    mShaderGenerator->setShaderCachePath(shaderCachePath);		
-#endif
-    // Create and register the material manager listener.
-    mMaterialMgrListener = new ShaderGeneratorTechniqueResolverListener(mShaderGenerator);				
-    Ogre::MaterialManager::getSingleton().addListener(mMaterialMgrListener);
-  }
-
-  return true;
-}
-
-//-----------------------------------------------------------------------
-void RTShaderSystem::finalizeRTShaderSystem()
-{
-  // Restore default scheme.
-  Ogre::MaterialManager::getSingleton().setActiveScheme(Ogre::MaterialManager::DEFAULT_SCHEME_NAME);
-
-  // Unregister the material manager listener.
-  if (mMaterialMgrListener != NULL)
-  {			
-    Ogre::MaterialManager::getSingleton().removeListener(mMaterialMgrListener);
-    delete mMaterialMgrListener;
-    mMaterialMgrListener = NULL;
-  }
-
-  // Finalize RTShader system.
-  if (mShaderGenerator != NULL)
-  {				
-    ShaderGenerator::finalize();
-    mShaderGenerator = NULL;
-  }
-}
-
-//-----------------------------------------------------------------------
-RTShaderSystem& RTShaderSystem::getSingleton()
-{
-	assert( msSingleton );  
-	return ( *msSingleton );
-}
-
-//-----------------------------------------------------------------------
-RTShaderSystem* RTShaderSystem::getSingletonPtr()
-{
-	assert( msSingleton );  
-	return msSingleton;
-}
-
-}
-}
-

Components/RTShaderSystem/src/OgreShaderFFPTexturing.cpp

 		curParams.mVSInTextureCoordinateType = GCT_FLOAT2;
 		break;
     case TEX_TYPE_2D_ARRAY:
+        curParams.mTextureSamplerType = GCT_SAMPLER2DARRAY;
+        curParams.mVSInTextureCoordinateType = GCT_FLOAT3;
+        break;
 	case TEX_TYPE_3D:
 		curParams.mTextureSamplerType = GCT_SAMPLER3D;
 		curParams.mVSInTextureCoordinateType = GCT_FLOAT3;

Components/RTShaderSystem/src/OgreShaderFunctionAtom.cpp

     OperandVector::const_iterator itLHSOps = lhs.mOperands.begin();
     OperandVector::const_iterator itRHSOps = rhs.mOperands.begin();
 
-    for ( ; itLHSOps != lhs.mOperands.end(), itRHSOps != rhs.mOperands.end(); ++itLHSOps, ++itRHSOps)
+    for ( ; ((itLHSOps != lhs.mOperands.end()) && (itRHSOps != rhs.mOperands.end())); ++itLHSOps, ++itRHSOps)
     {
         if (itLHSOps->getSemantic() < itRHSOps->getSemantic())
             return true;
     // Check the semantic and type.  The operands must be in the same order as well.
     OperandVector::const_iterator itLHSOps = lhs.mOperands.begin();
     OperandVector::const_iterator itRHSOps = rhs.mOperands.begin();
-    for ( ; itLHSOps != lhs.mOperands.end(), itRHSOps != rhs.mOperands.end(); ++itLHSOps, ++itRHSOps)
+    for ( ; ((itLHSOps != lhs.mOperands.end()) && (itRHSOps != rhs.mOperands.end())); ++itLHSOps, ++itRHSOps)
     {
         if (itLHSOps->getSemantic() != itRHSOps->getSemantic())
             return false;

Components/RTShaderSystem/src/OgreShaderGLSLESProgramWriter.cpp

 
             // Now remove duplicate declarations, first we have to sort the vector.
             std::sort(forwardDecl.begin(), forwardDecl.end(), FunctionInvocation::FunctionInvocationLessThan());
-            FunctionVector::const_iterator endIt = forwardDecl.erase(std::unique(forwardDecl.begin(), forwardDecl.end(), FunctionInvocation::FunctionInvocationCompare()), forwardDecl.end());
+            forwardDecl.erase(std::unique(forwardDecl.begin(), forwardDecl.end(), FunctionInvocation::FunctionInvocationCompare()), forwardDecl.end());
 
             for(unsigned int i = 0; i < program->getDependencyCount(); ++i)
             {

Components/RTShaderSystem/src/OgreShaderGLSLProgramWriter.cpp

 	mGpuConstTypeMap[GCT_FLOAT4] = "vec4";
 	mGpuConstTypeMap[GCT_SAMPLER1D] = "sampler1D";
 	mGpuConstTypeMap[GCT_SAMPLER2D] = "sampler2D";
+	mGpuConstTypeMap[GCT_SAMPLER2DARRAY] = "sampler2DArray";
 	mGpuConstTypeMap[GCT_SAMPLER3D] = "sampler3D";
 	mGpuConstTypeMap[GCT_SAMPLERCUBE] = "samplerCube";
 	mGpuConstTypeMap[GCT_MATRIX_2X2] = "mat2";

Components/RTShaderSystem/src/OgreShaderParameter.cpp

 	case GCT_INT4:
 	case GCT_SAMPLER1D:
 	case GCT_SAMPLER2D:
+    case GCT_SAMPLER2DARRAY:
 	case GCT_SAMPLER3D:
 	case GCT_SAMPLERCUBE:
 	case GCT_SAMPLER1DSHADOW:
 	{
 	case GCT_SAMPLER1D:
 	case GCT_SAMPLER2D:
+    case GCT_SAMPLER2DARRAY:
 	case GCT_SAMPLER3D:
 	case GCT_SAMPLERCUBE:
 	case GCT_SAMPLER1DSHADOW:
     default:
 	case GCT_SAMPLER1D:
     case GCT_SAMPLER2D:
+    case GCT_SAMPLER2DARRAY:
     case GCT_SAMPLER3D:
     case GCT_SAMPLERCUBE:
     case GCT_SAMPLER1DSHADOW:
     default:
 	case GCT_SAMPLER1D:
     case GCT_SAMPLER2D:
+    case GCT_SAMPLER2DARRAY:
     case GCT_SAMPLER3D:
     case GCT_SAMPLERCUBE:
     case GCT_SAMPLER1DSHADOW:
 	case GCT_SAMPLER2D:
 		return createSampler2D(index);
 
+    case GCT_SAMPLER2DARRAY:
+        return createSampler2DArray(index);
+
 	case GCT_SAMPLER3D:
 		return createSampler3D(index);
 
 }
 
 //-----------------------------------------------------------------------
+UniformParameterPtr ParameterFactory::createSampler2DArray(int index)
+{
+    return UniformParameterPtr(OGRE_NEW UniformParameter(GCT_SAMPLER2DARRAY, "gSampler2DArray_" + StringConverter::toString(index), 
+                                                         Parameter::SPS_UNKNOWN, index, 
+                                                         Parameter::SPC_UNKNOWN,
+                                                         (uint16)GPV_GLOBAL, 1));
+}
+
+//-----------------------------------------------------------------------
 UniformParameterPtr ParameterFactory::createSampler3D(int index)
 {
 	return UniformParameterPtr(OGRE_NEW UniformParameter(GCT_SAMPLER3D, "gSampler3D_" + StringConverter::toString(index), 

Components/RTShaderSystem/src/OgreShaderProgramProcessor.cpp

 				break;
             case GCT_SAMPLER1D:
             case GCT_SAMPLER2D:
+            case GCT_SAMPLER2DARRAY:
             case GCT_SAMPLER3D:
             case GCT_SAMPLERCUBE:
             case GCT_SAMPLER1DSHADOW:

Components/Terrain/src/OgreTerrain.cpp

 	const uint16 Terrain::TERRAIN_CHUNK_VERSION = 1;
 	const uint32 Terrain::TERRAINLAYERDECLARATION_CHUNK_ID = StreamSerialiser::makeIdentifier("TDCL");
 	const uint16 Terrain::TERRAINLAYERDECLARATION_CHUNK_VERSION = 1;
-	const uint32 Terrain::TERRAINLAYERSAMPLER_CHUNK_ID = StreamSerialiser::makeIdentifier("TSAM");;
+	const uint32 Terrain::TERRAINLAYERSAMPLER_CHUNK_ID = StreamSerialiser::makeIdentifier("TSAM");
 	const uint16 Terrain::TERRAINLAYERSAMPLER_CHUNK_VERSION = 1;
-	const uint32 Terrain::TERRAINLAYERSAMPLERELEMENT_CHUNK_ID = StreamSerialiser::makeIdentifier("TSEL");;
+	const uint32 Terrain::TERRAINLAYERSAMPLERELEMENT_CHUNK_ID = StreamSerialiser::makeIdentifier("TSEL");
 	const uint16 Terrain::TERRAINLAYERSAMPLERELEMENT_CHUNK_VERSION = 1;
-	const uint32 Terrain::TERRAINLAYERINSTANCE_CHUNK_ID = StreamSerialiser::makeIdentifier("TLIN");;
+	const uint32 Terrain::TERRAINLAYERINSTANCE_CHUNK_ID = StreamSerialiser::makeIdentifier("TLIN");
 	const uint16 Terrain::TERRAINLAYERINSTANCE_CHUNK_VERSION = 1;
-	const uint32 Terrain::TERRAINDERIVEDDATA_CHUNK_ID = StreamSerialiser::makeIdentifier("TDDA");;
+	const uint32 Terrain::TERRAINDERIVEDDATA_CHUNK_ID = StreamSerialiser::makeIdentifier("TDDA");
 	const uint16 Terrain::TERRAINDERIVEDDATA_CHUNK_VERSION = 1;
 	// since 129^2 is the greatest power we can address in 16-bit index
 	const uint16 Terrain::TERRAIN_MAX_BATCH_SIZE = 129; 
 	}
 	//---------------------------------------------------------------------
 	void Terrain::DefaultGpuBufferAllocator::warmStart(size_t numInstances, uint16 terrainSize, uint16 maxBatchSize, 
-		uint16 mMinBatchSize)
+		uint16 minBatchSize)
 	{
 		// TODO
 
 <p class="header" align="center">Change Log</p>
 
 <p class="mainheader">
+    v1.7.4 [Cthugha] (14 January 2012) - MAINTENANCE RELEASE</p>
+<ul>
+<li>iOS: Fix the fix I did for libraries that are included in SDK builds. Use iOS 3.2 when building SDKs</li>
+<li>OS X: Add visibility attributes to Cocoa classes so the symbols are exported. Apparently symbol visibility only has an effect for Objective-C on x86_64 targets.</li>
+<li>OS X: Fix the OS X build</li>
+<li>Bug 443: Small fix for Image::setColourAt</li>
+<li>GL: Fix for a couple old bugs that could cause lots of GL errors.  One is an assumption about 2 sided stencil support always being there.  The other related to the wrong enumerations being used for the extension that we are checking.  See <a href="http://www.ogre3d.org/forums/viewtopic.php?f=2&t=44132">relevant forum topic</a>.</li>
+<li>Missing D3D9 Software vertex processing fix</li>
+<li>Xcode templates update</li>
+<li>Adding RTShaderLib files to Xcode templates</li>
+<li>OS X: Fix for input issues on Lion.  NSTitledWindowMask is no longer implied when creating a NSWindow.  To fix, we just add it to the style mask that we use.</li>
+<li>iOS: The Dynamic Texture sample works.  It should be enabled.</li>
+<li>Add a forward slash to the beginning of paths in the Xcode 4 templates to workaround a weird bug in the template wizard that eats up any leading slashes in text fields</li>
+<li>GLES: A little cleanup and fixed GL errors when using BGRA textures.</li>
+<li>Fix the incorrect average and max FPS entries in SDK trays.</li>
+<li>The Xcode 4 templates will need to link to the CoreGraphics framework now.</li>
+<li>OS X: FSAA was not being applied to the both Carbon and Cocoa contexts at all.</li>
+<li>Updated FindOGRE.cmake to properly set OGRE_${COMPONENT}_BINARY variables with paths to the corresponding DLLs</li>
+<li>Updated FindTBB.cmake to correctly identify the version of Visual Studio used</li>
+<li>Consider OGRE_LIB_DIRECTORY when setting RPATH for SampleBrowser and OctreeZone plugin</li>
+<li>Fix D3D9 capabilities check for cubemaps</li>
+<li>Fixed a memory leak in InstancedGeometry</li>
+<li>Fix Boost license file location in CMake</li>
+<li>Fix definition of element extremes in ogremeshxml.dtd</li>
+<li>Have D3D9 rendersystem clean up properly when creating a renderwindow fails</li>
+</ul>
+
+
+<p class="mainheader">
     v1.7.3 [Cthugha] (08 May 2011) - MAINTENANCE RELEASE</p>
 <ul>
 <li>iOS: Remove the animation timer.  Since DisplayLink is used by default now, this only hurts performance of things like input.</li>

OgreMain/CMakeLists.txt

 endif()
 
 if (APPLE)
-  if (NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+  if (OGRE_BUILD_PLATFORM_APPLE_IOS)
+    set_target_properties(OgreMain PROPERTIES INSTALL_NAME_DIR "OGRE")
+  else ()
     set_target_properties(OgreMain PROPERTIES FRAMEWORK TRUE)
     # Set the INSTALL_PATH so that Frameworks can be local
     set_target_properties(OgreMain
       COMMAND mkdir ARGS -p ${OGRE_BINARY_DIR}/lib/$(CONFIGURATION)/Ogre.framework/Headers/OSX
       COMMAND ditto ${OGRE_SOURCE_DIR}/OgreMain/include/OSX/*.h ${OGRE_BINARY_DIR}/lib/$(CONFIGURATION)/Ogre.framework/Headers/OSX/	
 	)
-  else ()
-    set_target_properties(OgreMain PROPERTIES INSTALL_NAME_DIR "OGRE")
-    set_target_properties(OgreMain PROPERTIES XCODE_ATTRIBUTE_GCC_THUMB_SUPPORT "NO")
-    set_target_properties(OgreMain PROPERTIES XCODE_ATTRIBUTE_GCC_UNROLL_LOOPS "YES")
-    set_target_properties(OgreMain PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")
-    set_target_properties(OgreMain PROPERTIES XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES")
   endif ()
 
   # Framework is called 'Ogre'

OgreMain/include/NaCl/OgreConfigDialogImp.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-2012 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/NaCl/OgreErrorDialogImp.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-2012 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/NaCl/OgreTimerImp.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-2012 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/OgreAtomicWrappers.h

 
 }
 
-#if OGRE_COMPILER == OGRE_COMPILER_GNUC && OGRE_COMP_VER >= 412 && OGRE_THREAD_SUPPORT
+#if (((OGRE_COMPILER == OGRE_COMPILER_GNUC) && (OGRE_COMP_VER >= 412)) || (OGRE_COMPILER == OGRE_COMPILER_CLANG)) && OGRE_THREAD_SUPPORT
 
 namespace Ogre {
 
 
 		T operator+=(const T &add)
 		{
-			__sync_fetch_and_add (&mField, add);
+			return __sync_add_and_fetch (&mField, add);
 		}
 
         volatile T mField;

OgreMain/include/OgreDeflate.h

 		z_stream* mZStream;
 		size_t mCurrentPos;
 		
-		// Cache for read data in case skipping around
+		/// Cache for read data in case skipping around
 		StaticCache<16 * OGRE_STREAM_TEMP_SIZE> mReadCache;
 		
-		// Intermediate buffer for read / write
+		/// Intermediate buffer for read / write
 		unsigned char *mTmp;
 		
-		// Whether the underlying stream is valid compressed data
+		/// Whether the underlying stream is valid compressed data
 		bool mIsCompressedValid;
 		
 		
 		/** Constructor for creating unnamed stream wrapping another stream.
 		 @param compressedStream The stream that this stream will use when reading / 
 			writing compressed data. The access mode from this stream will be matched.
+		 @param tmpFileName Path/Filename to be used for temporary storage of incoming data
 		*/
-        DeflateStream(const DataStreamPtr& compressedStream);
+        DeflateStream(const DataStreamPtr& compressedStream, const String& tmpFileName = "");
 		/** Constructor for creating named stream wrapping another stream.
 		 @param name The name to give this stream
 		 @param compressedStream The stream that this stream will use when reading / 
 			writing compressed data. The access mode from this stream will be matched.
+		 @param tmpFileName Path/Filename to be used for temporary storage of incoming data
 		 */
-		DeflateStream(const String& name, const DataStreamPtr& compressedStream);	
+		DeflateStream(const String& name, const DataStreamPtr& compressedStream, const String& tmpFileName="");	
 		
 		~DeflateStream();
 		

OgreMain/include/OgreException.h

         */
         Exception(const Exception& rhs);
 
-		/// Needed for  compatibility with std::exception
+		/// Needed for compatibility with std::exception
 		~Exception() throw() {}
 
         /** Assignment operator.

OgreMain/include/OgreExternalTextureSource.h

 	/** Enum for type of texture play mode */
 	enum eTexturePlayMode
 	{
-		TextureEffectPause = 0,			//! Video starts out paused
-		TextureEffectPlay_ASAP = 1,		//! Video starts playing as soon as possible
-		TextureEffectPlay_Looping = 2	//! Video Plays Instantly && Loops
+		TextureEffectPause = 0,			/// Video starts out paused
+		TextureEffectPlay_ASAP = 1,		/// Video starts playing as soon as possible
+		TextureEffectPlay_Looping = 2	/// Video Plays Instantly && Loops
 	};
 
 	/** IMPORTANT: **Plugins must override default dictionary name!** 
 
 		//------------------------------------------------------------------------------//
 		/* Command objects for specifying some base features							*/
-		/* Any PlugIns wishing to add more specific params to "ExternalTextureSourcePlugins"*/
+		/* Any Plugins wishing to add more specific params to "ExternalTextureSourcePlugins"*/
 		/* dictionary, feel free to do so, that's why this is here						*/
         class _OgrePrivate CmdInputFileName : public ParamCommand
         {
 		//Base Functions that work with Command String Interface... Or can be called
 		//manually to create video through code 
 
-		//! Sets an input file name - if needed by plugin
+		/// Sets an input file name - if needed by plugin
 		void setInputName( String sIN ) { mInputFileName = sIN; }
-		//! Gets currently set input file name
+		/// Gets currently set input file name
 		const String& getInputName( ) const	{ return mInputFileName; }
-		//! Sets the frames per second - plugin may or may not use this
+		/// Sets the frames per second - plugin may or may not use this
 		void setFPS( int iFPS ) { mFramesPerSecond = iFPS; }
-		//! Gets currently set frames per second
-		const int getFPS( ) const { return mFramesPerSecond; }
-		//! Sets a play mode
+		/// Gets currently set frames per second
+		int getFPS( ) const { return mFramesPerSecond; }
+		/// Sets a play mode
 		void setPlayMode( eTexturePlayMode eMode )	{ mMode = eMode; }
-		//! Gets currently set play mode
+		/// Gets currently set play mode
 		eTexturePlayMode getPlayMode() const { return mMode; }
 
-		//! Used for attaching texture to Technique, State, and texture unit layer
+		/// Used for attaching texture to Technique, State, and texture unit layer
 		void setTextureTecPassStateLevel( int t, int p, int s ) 
 				{ mTechniqueLevel = t;mPassLevel = p;mStateLevel = s; }
-		//! Get currently selected Textute attribs.
+		/// Get currently selected Texture attribs.
 		void getTextureTecPassStateLevel( int& t, int& p, int& s ) const
 				{t = mTechniqueLevel;	p = mPassLevel;	s = mStateLevel;}
 		
 		/** Call from derived classes to ensure the dictionary is setup */
 		void addBaseParams();
 
-		/** Returns the string name of this PlugIn (as set by the PlugIn)*/
-		const String& getPlugInStringName( void ) const { return mPlugInName; }
+		/** Returns the string name of this Plugin (as set by the Plugin)*/
+		const String& getPluginStringName( void ) const { return mPluginName; }
 		/** Returns dictionary name */
 		const String& getDictionaryStringName( void ) const { return mDictionaryName; }
 
 		//Pure virtual functions that plugins must Override
 		/** Call this function from manager to init system */
 		virtual bool initialise() = 0;
-		/** Shuts down PlugIn */
+		/** Shuts down Plugin */
 		virtual void shutDown() = 0;
 
 		/** Creates a texture into an already defined material or one that is created new
 			const String& groupName = ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME) = 0;
 
 	protected:
-        static CmdInputFileName msCmdInputFile;		//! Command for setting input file name
-		static CmdFPS msCmdFramesPerSecond;			//! Command for setting frames per second
-		static CmdPlayMode msCmdPlayMode;			//! Command for setting play mode
-		static CmdTecPassState msCmdTecPassState;	//! Command for setting the technique, pass, & state level
+        static CmdInputFileName msCmdInputFile;		/// Command for setting input file name
+		static CmdFPS msCmdFramesPerSecond;			/// Command for setting frames per second
+		static CmdPlayMode msCmdPlayMode;			/// Command for setting play mode
+		static CmdTecPassState msCmdTecPassState;	/// Command for setting the technique, pass, & state level
 
 
-		//! String Name of this PlugIn
-		String mPlugInName;
+		/// String Name of this Plugin
+		String mPluginName;
 	
 		//------ Vars used for setting/getting dictionary stuff -----------//
 		eTexturePlayMode mMode;

OgreMain/include/OgreGpuProgramManager.h

 
         /** Get if the microcode of a shader should be saved to a cache
         */
-		const bool getSaveMicrocodesToCache() const;
+		bool getSaveMicrocodesToCache();
         /** Set if the microcode of a shader should be saved to a cache
         */
 		void setSaveMicrocodesToCache( const bool val );
 
-		const bool canGetCompiledShaderBuffer() const;
+		bool canGetCompiledShaderBuffer();
         /** Check if a microcode is available for a program in the microcode cache.
         @param name The name of the program.
         */

OgreMain/include/OgreGpuProgramParams.h

 		GCT_SAMPLERCUBE = 8,
 		GCT_SAMPLER1DSHADOW = 9,
 		GCT_SAMPLER2DSHADOW = 10,
-		GCT_MATRIX_2X2 = 11,
-		GCT_MATRIX_2X3 = 12,
-		GCT_MATRIX_2X4 = 13,
-		GCT_MATRIX_3X2 = 14,
-		GCT_MATRIX_3X3 = 15,
-		GCT_MATRIX_3X4 = 16,
-		GCT_MATRIX_4X2 = 17,
-		GCT_MATRIX_4X3 = 18,
-		GCT_MATRIX_4X4 = 19,
-		GCT_INT1 = 20,
-		GCT_INT2 = 21,
-		GCT_INT3 = 22,
-		GCT_INT4 = 23,
+		GCT_SAMPLER2DARRAY = 11,
+		GCT_MATRIX_2X2 = 12,
+		GCT_MATRIX_2X3 = 13,
+		GCT_MATRIX_2X4 = 14,
+		GCT_MATRIX_3X2 = 15,
+		GCT_MATRIX_3X3 = 16,
+		GCT_MATRIX_3X4 = 17,
+		GCT_MATRIX_4X2 = 18,
+		GCT_MATRIX_4X3 = 19,
+		GCT_MATRIX_4X4 = 20,
+		GCT_INT1 = 21,
+		GCT_INT2 = 22,
+		GCT_INT3 = 23,
+		GCT_INT4 = 24,
 		GCT_UNKNOWN = 99
 	};
 
 			case GCT_INT4:
 			case GCT_SAMPLER1D:
 			case GCT_SAMPLER2D:
+            case GCT_SAMPLER2DARRAY:
 			case GCT_SAMPLER3D:
 			case GCT_SAMPLERCUBE:
 			case GCT_SAMPLER1DSHADOW:
 			{
 			case GCT_SAMPLER1D:
 			case GCT_SAMPLER2D:
+            case GCT_SAMPLER2DARRAY:
 			case GCT_SAMPLER3D:
 			case GCT_SAMPLERCUBE:
 			case GCT_SAMPLER1DSHADOW:
 				case GCT_INT1:
 				case GCT_SAMPLER1D:
 				case GCT_SAMPLER2D:
+                case GCT_SAMPLER2DARRAY:
 				case GCT_SAMPLER3D:
 				case GCT_SAMPLERCUBE:
 				case GCT_SAMPLER1DSHADOW:
 				case GCT_INT1:
 				case GCT_SAMPLER1D:
 				case GCT_SAMPLER2D:
+                case GCT_SAMPLER2DARRAY:
 				case GCT_SAMPLER3D:
 				case GCT_SAMPLERCUBE:
 				case GCT_SAMPLER1DSHADOW:
 		GpuConstantDefinition()
 			: constType(GCT_UNKNOWN)
 			, physicalIndex((std::numeric_limits<size_t>::max)())
+            , logicalIndex(0)
 			, elementSize(0)
 			, arraySize(1)
 			, variability(GPV_GLOBAL) {}

OgreMain/include/OgreHardwareVertexBuffer.h

         /// Tangent (X axis if normal is Z)
         VES_TANGENT = 9,
         /// The  number of VertexElementSemantic elements (note - the first value VES_POSITION is 1) 
-        VES_COUNT = 9,
+        VES_COUNT = 9
 	};
 
     /// Vertex element type, used to identify the base types of the vertex contents

OgreMain/include/OgreInstanceBatch.h

         @param usedEntities Array of InstancedEntities to parent with this batch. Those reparented
             are removed from this input vector
         @remarks
-            This function assumes caller holds data to mInstancedEntities! Otherwise
-            you can get memory leaks. Don't call this directly if you don't know what you're doing!
+			This function assumes caller holds data to mInstancedEntities! Otherwise
+			you can get memory leaks. Don't call this directly if you don't know what you're doing!
+		*/
+		void _defragmentBatch( bool optimizeCulling, InstancedEntityVec &usedEntities );
+
+		/** @see InstanceManager::_defragmentBatchDiscard
+			Destroys unused entities and clears the mInstancedEntity container which avoids leaving
+			dangling pointers from reparented InstancedEntities
+			Usually called before deleting this pointer. Don't call directly!
+		*/
+		void _defragmentBatchDiscard(void);
+
+		/** Called by InstancedEntity(s) to tell us we need to update the bounds
+			(we touch the SceneNode so the SceneManager aknowledges such change)
         */
-        void _defragmentBatch( bool optimizeCulling, InstancedEntityVec &usedEntities );
+		virtual void _boundsDirty(void);
 
-        /** @see InstanceManager::_defragmentBatchDiscard
-            Destroys unused entities and clears the mInstancedEntity container which avoids leaving
-            dangling pointers from reparented InstancedEntities
-            Usually called before deleting this pointer. Don't call directly!
+		/** Tells this batch to stop updating animations, positions, rotations, and display
+			all it's active instances. Currently only InstanceBatchHW & InstanceBatchHW_VTF support it.
+			This option makes the batch behave pretty much like Static Geometry, but with the GPU RAM
+			memory advantages (less VRAM, less bandwidth) and not LOD support. Very useful for
+			billboards of trees, repeating vegetation, etc.
+			@remarks
+				This function moves a lot of processing time from the CPU to the GPU. If the GPU
+				is already a bottleneck, you may see a decrease in performance instead!
+				Call this function again (with bStatic=true) if you've made a change to an
+				InstancedEntity and wish this change to take effect.
+				Be sure to call this after you've set all your instances
+				@see InstanceBatchHW::setStaticAndUpdate
+		*/
+		virtual void setStaticAndUpdate( bool bStatic )		{}
+
+		/** Returns true if this batch was set as static. @see setStaticAndUpdate
+		*/
+		virtual bool isStatic() const						{ return false; }
+
+		/** Returns a pointer to a new InstancedEntity ready to use
+			Note it's actually preallocated, so no memory allocation happens at
+			this point.
+			@remarks
+				Returns NULL if all instances are being used
         */
-        void _defragmentBatchDiscard(void);
+		InstancedEntity* createInstancedEntity();
 
-        /** Called by InstancedEntity(s) to tell us we need to update the bounds
-            (we touch the SceneNode so the SceneManager aknowledges such change)
+		/** Removes an InstancedEntity from the scene retrieved with
+			getNewInstancedEntity, putting back into a queue
+			@remarks
+				Throws an exception if the instanced entity wasn't created by this batch
+				Removed instanced entities save little CPU time, but _not_ GPU
         */
-        virtual void _boundsDirty(void);
+		void removeInstancedEntity( InstancedEntity *instancedEntity );
 
-        /** Tells this batch to stop updating animations, positions, rotations, and display
-            all it's active instances. Currently only InstanceBatchHW & InstanceBatchHW_VTF support it.
-            This option makes the batch behave pretty much like Static Geometry, but with the GPU RAM
-            memory advantages (less VRAM, less bandwidth) and not LOD support. Very useful for
-            billboards of trees, repeating vegetation, etc.
-        @remarks
-            This function moves a lot of processing time from the CPU to the GPU. If the GPU
-            is already a bottleneck, you may see a decrease in performance instead!
-            Call this function again (with bStatic=true) if you've made a change to an
-            InstancedEntity and wish this change to take effect.
-            Be sure to call this after you've set all your instances
-        @see InstanceBatchHW::setStaticAndUpdate
+		/** Tells whether world bone matrices need to be calculated.
+			This does not include bone matrices which are calculated regardless
         */
-        virtual void setStaticAndUpdate( bool bStatic ) {}
+		virtual bool useBoneWorldMatrices() const { return true; }
 
-        /** Returns true if this batch was set as static. @see setStaticAndUpdate
-        */
-        virtual bool isStatic() const { return false; }
+		/** Tells that the list of entity instances with shared transforms has changed */
+		void _markTransformSharingDirty() { mTransformSharingDirty = true; }
 
-        /** Returns a pointer to a new InstancedEntity ready to use
-            Note it's actually preallocated, so no memory allocation happens at
-            this point.
-        @remarks
-            Returns NULL if all instances are being used
-        */
-        InstancedEntity* createInstancedEntity();
+		//Renderable overloads
+        /** @copydoc Renderable::getMaterial. */
+		const MaterialPtr& getMaterial(void) const		{ return mMaterial; }
+        /** @copydoc Renderable::getRenderOperation. */
+		void getRenderOperation( RenderOperation& op )	{ op = mRenderOperation; }
 
-        /** Removes an InstancedEntity from the scene retrieved with
-            getNewInstancedEntity, putting back into a queue
-        @remarks
-            Throws an exception if the instanced entity wasn't created by this batch
-            Removed instanced entities save little CPU time, but _not_ GPU
-        */
-        void removeInstancedEntity( InstancedEntity *instancedEntity );
+        /** @copydoc Renderable::getSquaredViewDepth. */
+		Real getSquaredViewDepth( const Camera* cam ) const;
+        /** @copydoc Renderable::getLights. */
+        const LightList& getLights( void ) const;
+        /** @copydoc Renderable::getTechnique. */
+		Technique* getTechnique(void) const;
 
-        /** Tells whether world bone matrices need to be calculated.
-            This does not include bone matrices which are calculated regardless
-        */
-        virtual bool useBoneWorldMatrices() const { return true; }
+        /** @copydoc MovableObject::getMovableType. */
+		const String& getMovableType(void) const;
+        /** @copydoc MovableObject::_notifyCurrentCamera. */
+		void _notifyCurrentCamera( Camera* cam );
+        /** @copydoc MovableObject::getBoundingBox. */
+		const AxisAlignedBox& getBoundingBox(void) const;
+        /** @copydoc MovableObject::getBoundingRadius. */
+		Real getBoundingRadius(void) const;
 
-        /** Tells that the list of entity instances with shared transforms has changed */
-        void _markTransformSharingDirty() { mTransformSharingDirty = true; }
-
-        //Renderable overloads
-        const MaterialPtr& getMaterial(void) const { return mMaterial; }
-        void getRenderOperation( RenderOperation& op ) { op = mRenderOperation; }
-
-        Real getSquaredViewDepth( const Camera* cam ) const;
-        const LightList& getLights( void ) const;
-        Technique* getTechnique(void) const;
-
-        //MovableObject overloads
-        const String& getMovableType(void) const;
-        void _notifyCurrentCamera( Camera* cam );
-        const AxisAlignedBox& getBoundingBox(void) const;
-        Real getBoundingRadius(void) const;
-
-        virtual void _updateRenderQueue(RenderQueue* queue);
-        void visitRenderables( Renderable::Visitor* visitor, bool debugRenderables = false );
-    };
+		virtual void _updateRenderQueue(RenderQueue* queue);
+		void visitRenderables( Renderable::Visitor* visitor, bool debugRenderables = false );
+	};
 } // namespace Ogre
 
 #endif // __InstanceBatch_H__

OgreMain/include/OgreInstanceManager.h

File contents unchanged.

OgreMain/include/OgreParticleSystem.h

             under control should they be affected by complex parameters which alter their emission rates
             etc. If a particle system reaches it's particle quota, none of the emitters will be able to 
             emit any more particles. As existing particles die, the spare capacity will be allocated
-            equally across all emitters to be as consistent to the origina particle system style as possible.
+            equally across all emitters to be as consistent to the original particle system style as possible.
+            The quota can be increased but not decreased after the system has been created.
         @param quota The maximum number of particles this system is allowed to have.
         */
         void setParticleQuota(size_t quota);

OgreMain/include/OgrePlatform.h

 #define OGRE_COMPILER_BORL 3
 #define OGRE_COMPILER_WINSCW 4
 #define OGRE_COMPILER_GCCE 5
+#define OGRE_COMPILER_CLANG 6
 
 #define OGRE_ENDIAN_LITTLE 1
 #define OGRE_ENDIAN_BIG 2
 #elif defined( _MSC_VER )
 #   define OGRE_COMPILER OGRE_COMPILER_MSVC
 #   define OGRE_COMP_VER _MSC_VER
+#elif defined( __clang__ )
+#   define OGRE_COMPILER OGRE_COMPILER_CLANG
+#   define OGRE_COMP_VER (((__clang_major__)*100) + \
+        (__clang_minor__*10) + \
+        __clang_patchlevel__)
 #elif defined( __GNUC__ )
 #   define OGRE_COMPILER OGRE_COMPILER_GNUC
 #   define OGRE_COMP_VER (((__GNUC__)*100) + \
         (__GNUC_MINOR__*10) + \
         __GNUC_PATCHLEVEL__)
-
 #elif defined( __BORLANDC__ )
 #   define OGRE_COMPILER OGRE_COMPILER_BORL
 #   define OGRE_COMP_VER __BCPLUSPLUS__

OgreMain/include/OgrePlatformInformation.h

 #if OGRE_COMPILER == OGRE_COMPILER_MSVC
 #   define OGRE_ALIGNED_DECL(type, var, alignment)  __declspec(align(alignment)) type var
 
-#elif OGRE_COMPILER == OGRE_COMPILER_GNUC
+#elif (OGRE_COMPILER == OGRE_COMPILER_GNUC) || (OGRE_COMPILER == OGRE_COMPILER_CLANG)
 #   define OGRE_ALIGNED_DECL(type, var, alignment)  type var __attribute__((__aligned__(alignment)))
 
 #else
 #if   OGRE_DOUBLE_PRECISION == 0 && OGRE_CPU == OGRE_CPU_X86 && OGRE_COMPILER == OGRE_COMPILER_MSVC && \
     OGRE_PLATFORM != OGRE_PLATFORM_NACL
 #   define __OGRE_HAVE_SSE  1
-#elif OGRE_DOUBLE_PRECISION == 0 && OGRE_CPU == OGRE_CPU_X86 && OGRE_COMPILER == OGRE_COMPILER_GNUC && \
+#elif OGRE_DOUBLE_PRECISION == 0 && OGRE_CPU == OGRE_CPU_X86 && (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && \
       OGRE_PLATFORM != OGRE_PLATFORM_APPLE_IOS && OGRE_PLATFORM != OGRE_PLATFORM_NACL
 #   define __OGRE_HAVE_SSE  1
 #endif
 
 /* Define whether or not Ogre compiled with VFP supports.
  */
-#if OGRE_DOUBLE_PRECISION == 0 && OGRE_CPU == OGRE_CPU_ARM && OGRE_COMPILER == OGRE_COMPILER_GNUC && defined(__ARM_ARCH_6K__) && defined(__VFP_FP__)
+#if OGRE_DOUBLE_PRECISION == 0 && OGRE_CPU == OGRE_CPU_ARM && (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && defined(__ARM_ARCH_6K__) && defined(__VFP_FP__)
 #   define __OGRE_HAVE_VFP  1
 #endif
 
 /* Define whether or not Ogre compiled with NEON supports.
  */
-#if OGRE_DOUBLE_PRECISION == 0 && OGRE_CPU == OGRE_CPU_ARM && OGRE_COMPILER == OGRE_COMPILER_GNUC && defined(__ARM_ARCH_7A__) && defined(__ARM_NEON__)
+#if OGRE_DOUBLE_PRECISION == 0 && OGRE_CPU == OGRE_CPU_ARM && (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && defined(__ARM_ARCH_7A__) && defined(__ARM_NEON__)
 #   define __OGRE_HAVE_NEON  1
 #endif
 

OgreMain/include/OgrePose.h

     (Object-oriented Graphics Rendering Engine)
 For the latest info, see http://www.ogre3d.org/
 
-Copyright (c) 2000-2005 The OGRE Team
+ Copyright (c) 2000-2012 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/OgrePrerequisites.h

 	#       define HashMap ::__gnu_cxx::hash_map
 	#       define HashSet ::__gnu_cxx::hash_set
 	#    endif
+    #elif OGRE_COMPILER == OGRE_COMPILER_CLANG
+    #    if defined(_LIBCPP_VERSION)
+    #       define HashMap ::std::unordered_map
+    #       define HashSet ::std::unordered_set
+    #    else
+    #       define HashMap ::std::tr1::unordered_map
+    #       define HashSet ::std::tr1::unordered_set
+    #    endif
     #else
     #   if OGRE_COMPILER == OGRE_COMPILER_MSVC
     #       if OGRE_COMP_VER >= 1600 // VC++ 10.0

OgreMain/include/OgreProgressiveMesh.h

 			VRQ_PROPORTIONAL,
 			/// All vertices with reduction error cost less than reductionValue * sqr(lodDistance[lodLevel] / lodDistance[0]) 
 			/// are removed at each reduction. Error cost is calculated as introduced error area divided by squared mesh diagonal
-			VRQ_ERROR_COST,
+			VRQ_ERROR_COST
 		};
 
 		

OgreMain/include/OgreRenderOperation.h

 		/// in only a part of the render systems.
 		size_t numberOfInstances;
 
-        /// a flag to indicate that it is possible for this operation to use a global
-        /// vertex instance buffer if available. 
+        /** A flag to indicate that it is possible for this operation to use a global
+            vertex instance buffer if available.*/
         bool useGlobalInstancingVertexBufferIsAvailable;
 
         RenderOperation() :

OgreMain/include/OgreRenderQueueInvocation.h

     (Object-oriented Graphics Rendering Engine)
 For the latest info, see http://www.ogre3d.org/
 
-Copyright (c) 2000-2005 The OGRE Team
+ Copyright (c) 2000-2012 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/OgreRenderSystem.h

 		/** Sets the global instance vertex buffer.
 		*/
         void setGlobalInstanceVertexBuffer(const HardwareVertexBufferSharedPtr val);
-		/** gets vertex declaration for the global vertex buffer for the global instancing
+		/** Gets vertex declaration for the global vertex buffer for the global instancing
 		*/
         VertexDeclaration* getGlobalInstanceVertexBufferVertexDeclaration() const;
-		/** sets vertex declaration for the global vertex buffer for the global instancing
+		/** Sets vertex declaration for the global vertex buffer for the global instancing
 		*/
         void setGlobalInstanceVertexBufferVertexDeclaration( VertexDeclaration* val);
-		/** gets the global number of instances.
+		/** Gets the global number of instances.
 		*/
         size_t getGlobalNumberOfInstances() const;
-		/** sets the global number of instances.
+		/** Sets the global number of instances.
 		*/
         void setGlobalNumberOfInstances(const size_t val);
 

OgreMain/include/OgreSearchOps.h

 #endif
 #define _A_SUBDIR 0x10  /* Subdirectory */
 
-long _findfirst(const char *pattern, struct _finddata_t *data);
-int _findnext(long id, struct _finddata_t *data);
-int _findclose(long id);
+intptr_t _findfirst(const char *pattern, struct _finddata_t *data);
+int _findnext(intptr_t id, struct _finddata_t *data);
+int _findclose(intptr_t id);
 
 #endif
 

OgreMain/include/OgreStdHeaders.h

 #       include <ext/hash_map>
 #       include <ext/hash_set>
 #   endif
+#elif (OGRE_COMPILER == OGRE_COMPILER_CLANG)
+#   if defined(_LIBCPP_VERSION)
+#       include <unordered_map>
+#       include <unordered_set>
+#   else
+#       include <tr1/unordered_map>
+#       include <tr1/unordered_set>
+#   endif
 #else
 #   if (OGRE_COMPILER == OGRE_COMPILER_MSVC) && !defined(STLPORT) && OGRE_COMP_VER >= 1600 // VC++ 10.0
 #    	include <unordered_map>

OgreMain/include/OgreString.h

 #   else
 	typedef ::std::tr1::hash< _StringBase > _StringHash;
 #   endif
+#elif OGRE_COMPILER == OGRE_COMPILER_CLANG
+#   if defined(_LIBCPP_VERSION)
+	typedef ::std::hash< _StringBase > _StringHash;
+#   else
+	typedef ::std::tr1::hash< _StringBase > _StringHash;
+#   endif
 #elif OGRE_COMPILER == OGRE_COMPILER_MSVC && OGRE_COMP_VER >= 1600 && !defined(STLPORT) // VC++ 10.0
 	typedef ::std::tr1::hash< _StringBase > _StringHash;
 #elif !defined( _STLP_HASH_FUN_H )

OgreMain/include/OgreStringSerialiser.h

+/*
+ -----------------------------------------------------------------------------
+ This source file is part of OGRE
+ (Object-oriented Graphics Rendering Engine)
+ For the latest info, see http://www.ogre3d.org/
+ 
+ Copyright (c) 2000-2012 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
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ -----------------------------------------------------------------------------
+ */
 #ifndef __StringSerialiser_H__
 #define __StringSerialiser_H__
 

OgreMain/include/OgreTextureManager.h

 			bool hwGammaCorrection = false, uint fsaa = 0, const String& fsaaHint = StringUtil::BLANK)
 		{
 			return createManual(name, group, texType, width, height, 1, 
-				num_mips, format, usage, loader, hwGammaCorrection, fsaa, fsaaHint);
+				numMipmaps, format, usage, loader, hwGammaCorrection, fsaa, fsaaHint);
 		}
 
         /** Sets preferred bit depth for integer pixel format textures.
         */
         virtual void setPreferredIntegerBitDepth(ushort bits, bool reloadTextures = true);
 
-        /** gets preferred bit depth for integer pixel format textures.
+        /** Gets preferred bit depth for integer pixel format textures.
         */
         virtual ushort getPreferredIntegerBitDepth(void) const;
 
         */
         virtual void setPreferredFloatBitDepth(ushort bits, bool reloadTextures = true);
 
-        /** gets preferred bit depth for float pixel format textures.
+        /** Gets preferred bit depth for float pixel format textures.
         */
         virtual ushort getPreferredFloatBitDepth(void) const;
 

OgreMain/include/iOS/OgreConfigDialogImp.h

+/*
+ -----------------------------------------------------------------------------
+ This source file is part of OGRE
+ (Object-oriented Graphics Rendering Engine)
+ For the latest info, see http://www.ogre3d.org/
+ 
+ Copyright (c) 2000-2012 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
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ -----------------------------------------------------------------------------
+ */
 #ifndef __iOSConfigDialog_H__
 #define __iOSConfigDialog_H__
 

OgreMain/src/GLX/OgreConfigDialog.cpp

 */
 #include "GLX_backdrop.h"
 
-};
+}