Commits

Hesham Wahba committed 53455cc

SkyX and Hydrax compile support added, doesn't quite work yet

  • Participants
  • Parent commits 959812d

Comments (0)

Files changed (153)

File IbexMac.xcodeproj/project.pbxproj

 		4C961B6017B89DB50028D242 /* Rift.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C961B5917B89DB50028D242 /* Rift.cpp */; };
 		4C961B6117B89DB50028D242 /* Rift.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C961B5917B89DB50028D242 /* Rift.cpp */; };
 		4C961B6217B89DB50028D242 /* Rift.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C961B5917B89DB50028D242 /* Rift.cpp */; };
+		4C9BEA7617E56A2F00662683 /* Dependencies in Resources */ = {isa = PBXBuildFile; fileRef = 4C9BEA7517E56A2F00662683 /* Dependencies */; };
+		4C9BEA7717E56A2F00662683 /* Dependencies in Resources */ = {isa = PBXBuildFile; fileRef = 4C9BEA7517E56A2F00662683 /* Dependencies */; };
+		4C9BEA7817E56A2F00662683 /* Dependencies in Resources */ = {isa = PBXBuildFile; fileRef = 4C9BEA7517E56A2F00662683 /* Dependencies */; };
+		4C9BEA7917E56A2F00662683 /* Dependencies in Resources */ = {isa = PBXBuildFile; fileRef = 4C9BEA7517E56A2F00662683 /* Dependencies */; };
 		4CA92BC41729FB1F00994379 /* libovr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CA92BC31729FB1F00994379 /* libovr.a */; };
 		4CABF7EA1730926900F94A46 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CABF7E91730926900F94A46 /* OpenAL.framework */; };
 		4CABF7EB1730927500F94A46 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CABF7E91730926900F94A46 /* OpenAL.framework */; };
 		4C33AA3316970C3B001A1EFC /* IbexMac.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = IbexMac.entitlements; sourceTree = "<group>"; };
 		4C41231F16936E4F008F5B15 /* IbexMacUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IbexMacUtils.h; sourceTree = "<group>"; };
 		4C41232016936E4F008F5B15 /* IbexMacUtils.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = IbexMacUtils.mm; sourceTree = "<group>"; };
-		4C46D7B316F2AED900B5DD9E /* sixense_math.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sixense_math.cpp; path = ../sixense_math.cpp; sourceTree = "<group>"; };
-		4C46D7B416F2AED900B5DD9E /* sixense_math.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = sixense_math.hpp; path = ../sixense_math.hpp; sourceTree = "<group>"; };
-		4C46D7B616F2AED900B5DD9E /* button_states.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = button_states.hpp; sourceTree = "<group>"; };
-		4C46D7B816F2AED900B5DD9E /* controller_manager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = controller_manager.hpp; sourceTree = "<group>"; };
-		4C46D7B916F2AED900B5DD9E /* derivatives.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = derivatives.hpp; sourceTree = "<group>"; };
-		4C46D7BA16F2AED900B5DD9E /* event_triggers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = event_triggers.hpp; sourceTree = "<group>"; };
-		4C46D7BB16F2AED900B5DD9E /* export.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = export.hpp; sourceTree = "<group>"; };
-		4C46D7BC16F2AED900B5DD9E /* fps.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = fps.hpp; sourceTree = "<group>"; };
-		4C46D7BD16F2AED900B5DD9E /* interfaces.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = interfaces.hpp; sourceTree = "<group>"; };
-		4C46D7BE16F2AED900B5DD9E /* keyboard_and_mouse_win32.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = keyboard_and_mouse_win32.hpp; sourceTree = "<group>"; };
-		4C46D7BF16F2AED900B5DD9E /* laser_pointer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = laser_pointer.hpp; sourceTree = "<group>"; };
-		4C46D7C016F2AED900B5DD9E /* mouse_pointer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = mouse_pointer.hpp; sourceTree = "<group>"; };
-		4C46D7C116F2AED900B5DD9E /* sixense_utils_string.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sixense_utils_string.hpp; sourceTree = "<group>"; };
-		4C46D7C216F2AED900B5DD9E /* time.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = time.hpp; sourceTree = "<group>"; };
-		4C46D7C316F2AED900B5DD9E /* sixense.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sixense.h; sourceTree = "<group>"; };
 		4C46D7C616F2B93D00B5DD9E /* libsixense_utils_x64.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsixense_utils_x64.dylib; path = /usr/local/lib/libsixense_utils_x64.dylib; sourceTree = "<absolute>"; };
 		4C46D7C716F2B93D00B5DD9E /* libsixense_x64.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsixense_x64.dylib; path = /usr/local/lib/libsixense_x64.dylib; sourceTree = "<absolute>"; };
 		4C49790D17CCC6A0008DC26E /* tinystr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinystr.cpp; sourceTree = "<group>"; };
 		4C961B5817B89DB50028D242 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
 		4C961B5917B89DB50028D242 /* Rift.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Rift.cpp; sourceTree = "<group>"; };
 		4C961B5A17B89DB50028D242 /* Rift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Rift.h; sourceTree = "<group>"; };
+		4C9BEA7517E56A2F00662683 /* Dependencies */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Dependencies; sourceTree = "<group>"; };
 		4CA92BC31729FB1F00994379 /* libovr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libovr.a; path = ../OculusSDK/LibOVR/Lib/MacOS/Debug/libovr.a; sourceTree = "<group>"; };
 		4CABF7E91730926900F94A46 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
 		4CABF81F1730BAF600F94A46 /* libxvidcore.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libxvidcore.a; path = /usr/local/Cellar/xvid/1.3.2/lib/libxvidcore.a; sourceTree = "<absolute>"; };
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
-		4C46D7B216F2AEBA00B5DD9E /* sixsense_headers */ = {
-			isa = PBXGroup;
-			children = (
-				4C46D7B516F2AED900B5DD9E /* sixense_utils */,
-				4C46D7C316F2AED900B5DD9E /* sixense.h */,
-			);
-			name = sixsense_headers;
-			sourceTree = "<group>";
-		};
-		4C46D7B516F2AED900B5DD9E /* sixense_utils */ = {
-			isa = PBXGroup;
-			children = (
-				4C46D7B616F2AED900B5DD9E /* button_states.hpp */,
-				4C46D7B716F2AED900B5DD9E /* controller_manager */,
-				4C46D7B916F2AED900B5DD9E /* derivatives.hpp */,
-				4C46D7BA16F2AED900B5DD9E /* event_triggers.hpp */,
-				4C46D7BB16F2AED900B5DD9E /* export.hpp */,
-				4C46D7BC16F2AED900B5DD9E /* fps.hpp */,
-				4C46D7BD16F2AED900B5DD9E /* interfaces.hpp */,
-				4C46D7BE16F2AED900B5DD9E /* keyboard_and_mouse_win32.hpp */,
-				4C46D7BF16F2AED900B5DD9E /* laser_pointer.hpp */,
-				4C46D7C016F2AED900B5DD9E /* mouse_pointer.hpp */,
-				4C46D7C116F2AED900B5DD9E /* sixense_utils_string.hpp */,
-				4C46D7B316F2AED900B5DD9E /* sixense_math.cpp */,
-				4C46D7B416F2AED900B5DD9E /* sixense_math.hpp */,
-				4C46D7C216F2AED900B5DD9E /* time.hpp */,
-			);
-			path = sixense_utils;
-			sourceTree = "<group>";
-		};
-		4C46D7B716F2AED900B5DD9E /* controller_manager */ = {
-			isa = PBXGroup;
-			children = (
-				4C46D7B816F2AED900B5DD9E /* controller_manager.hpp */,
-			);
-			path = controller_manager;
-			sourceTree = "<group>";
-		};
 		4C49790C17CCC6A0008DC26E /* tinyxml */ = {
 			isa = PBXGroup;
 			children = (
 		4CB79870168AB41E00EF5260 /* IbexMac */ = {
 			isa = PBXGroup;
 			children = (
+				4C9BEA7517E56A2F00662683 /* Dependencies */,
 				4C49790C17CCC6A0008DC26E /* tinyxml */,
 				4C961B5717B89DB50028D242 /* oculus */,
 				4C961B5017B89A780028D242 /* simpleworld_plugin */,
 				4C961B1C17B8949C0028D242 /* windows */,
 				4C961B3D17B899860028D242 /* filesystem */,
 				4CB79871168AB41E00EF5260 /* Supporting Files */,
-				4C46D7B216F2AEBA00B5DD9E /* sixsense_headers */,
 				4CAC8D5D169347AE00341AA0 /* resources */,
 				4CAC8D43168E5F1900341AA0 /* iphone_orientation_plugin */,
 				4CAC8D511690A1C100341AA0 /* GL */,
 				4C0937D017B1F9CE004EA291 /* InfoPlist.strings in Resources */,
 				4C0937D117B1F9CE004EA291 /* Credits.rtf in Resources */,
 				4C961B2317B8949C0028D242 /* CMakeLists.txt in Resources */,
+				4C9BEA7917E56A2F00662683 /* Dependencies in Resources */,
 				4C0937D217B1F9CE004EA291 /* MainMenu.xib in Resources */,
 				4C961B5E17B89DB50028D242 /* CMakeLists.txt in Resources */,
 				4C961B4417B899860028D242 /* CMakeLists.txt in Resources */,
 				4C0D58AF16AD656A007BC9CD /* InfoPlist.strings in Resources */,
 				4C0D58B016AD656A007BC9CD /* Credits.rtf in Resources */,
 				4C961B2117B8949C0028D242 /* CMakeLists.txt in Resources */,
+				4C9BEA7717E56A2F00662683 /* Dependencies in Resources */,
 				4C0D58B116AD656A007BC9CD /* MainMenu.xib in Resources */,
 				4C961B5C17B89DB50028D242 /* CMakeLists.txt in Resources */,
 				4C961B4217B899860028D242 /* CMakeLists.txt in Resources */,
 				4C6B99F716F4C17E00C5C725 /* InfoPlist.strings in Resources */,
 				4C6B99F816F4C17E00C5C725 /* Credits.rtf in Resources */,
 				4C961B2217B8949C0028D242 /* CMakeLists.txt in Resources */,
+				4C9BEA7817E56A2F00662683 /* Dependencies in Resources */,
 				4C6B99F916F4C17E00C5C725 /* MainMenu.xib in Resources */,
 				4C961B5D17B89DB50028D242 /* CMakeLists.txt in Resources */,
 				4C961B4317B899860028D242 /* CMakeLists.txt in Resources */,
 				4CB79875168AB41E00EF5260 /* InfoPlist.strings in Resources */,
 				4CB7987B168AB41E00EF5260 /* Credits.rtf in Resources */,
 				4C961B2017B8949C0028D242 /* CMakeLists.txt in Resources */,
+				4C9BEA7617E56A2F00662683 /* Dependencies in Resources */,
 				4CB79881168AB41E00EF5260 /* MainMenu.xib in Resources */,
 				4C961B5B17B89DB50028D242 /* CMakeLists.txt in Resources */,
 				4C961B4117B899860028D242 /* CMakeLists.txt in Resources */,

File IbexMac.xcodeproj/project.xcworkspace/xcshareddata/IbexMac.xccheckout

 	<key>IDESourceControlProjectFavoriteDictionaryKey</key>
 	<false/>
 	<key>IDESourceControlProjectIdentifier</key>
-	<string>15DF6C8D-3701-4AF4-B865-F3A1895FBD10</string>
+	<string>848AE314-1C06-40FD-93D4-AA8BC486C928</string>
 	<key>IDESourceControlProjectName</key>
 	<string>IbexMac</string>
 	<key>IDESourceControlProjectOriginsDictionary</key>
 	<dict>
-		<key>CB8B2B19-5996-4C9E-B481-63EF657BDE1B</key>
+		<key>99FFCA8A-8C76-466E-90CD-B257642FF0AE</key>
 		<string>https://bitbucket.org/druidsbane/ibex.git</string>
 	</dict>
 	<key>IDESourceControlProjectPath</key>
 	<string>IbexMac.xcodeproj/project.xcworkspace</string>
 	<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
 	<dict>
-		<key>CB8B2B19-5996-4C9E-B481-63EF657BDE1B</key>
+		<key>99FFCA8A-8C76-466E-90CD-B257642FF0AE</key>
 		<string>../..</string>
 	</dict>
 	<key>IDESourceControlProjectURL</key>
 	<key>IDESourceControlProjectVersion</key>
 	<integer>110</integer>
 	<key>IDESourceControlProjectWCCIdentifier</key>
-	<string>CB8B2B19-5996-4C9E-B481-63EF657BDE1B</string>
+	<string>99FFCA8A-8C76-466E-90CD-B257642FF0AE</string>
 	<key>IDESourceControlProjectWCConfigurations</key>
 	<array>
 		<dict>
 			<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
 			<string>public.vcs.git</string>
 			<key>IDESourceControlWCCIdentifierKey</key>
-			<string>CB8B2B19-5996-4C9E-B481-63EF657BDE1B</string>
+			<string>99FFCA8A-8C76-466E-90CD-B257642FF0AE</string>
 			<key>IDESourceControlWCCName</key>
 			<string>ibex</string>
 		</dict>

File IbexMac.xcodeproj/project.xcworkspace/xcuserdata/hesh.xcuserdatad/UserInterfaceState.xcuserstate

Binary file modified.

File IbexMac/CMakeLists.txt

     
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OGRE_INCLUDE_FLAGS}")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OGRE_INCLUDE_FLAGS}")
+    
+    add_subdirectory(Dependencies/Hydrax)
+    add_subdirectory(Dependencies/SkyX)
+    set(OGRE_LIBS ${OGRE_LIBS} ibex_hydrax ibex_skyx)
 endif(OGRE)
 
 add_subdirectory(windows)
 ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 
 include_directories(
+  ${CMAKE_CURRENT_SOURCE_DIR}/Dependencies
      ${CMAKE_CURRENT_SOURCE_DIR}
      ${Boost_INCLUDE_DIR}
  )
     ${OSX_LIBS}
 )
  
-set_target_properties( ibex PROPERTIES RESOURCE "${RESOURCES}" )
+set_target_properties( ibex PROPERTIES RESOURCE "${RESOURCES}")
 
 #--------------------------------------------------------------------------------
 # For Apple set the icns file containing icons

File IbexMac/Dependencies/Hydrax/CMakeLists.txt

+set(HEADER_FILES
+    CfgFileManager.h
+    GPUNormalMapManager.h
+    MaterialManager.h  TextureManager.h
+    DecalsManager.h
+    Help.h
+    Mesh.h
+    Enums.h
+    Hydrax.h
+    Prerequisites.h
+    GodRaysManager.h
+    Image.h
+    RttManager.h
+    Noise/Noise.h
+    Noise/Perlin/Perlin.h
+    Noise/FFT/FFT.h
+    Modules/Module.h
+    Modules/ProjectedGrid/ProjectedGrid.h
+    Modules/RadialGrid/RadialGrid.h
+    Modules/SimpleGrid/SimpleGrid.h
+
+)
+set(SOURCE_FILES
+    CfgFileManager.cpp
+    Help.cpp
+    Prerequisites.cpp
+    DecalsManager.cpp
+    Hydrax.cpp
+    RttManager.cpp
+    Enums.cpp
+    Image.cpp
+    TextureManager.cpp
+    GodRaysManager.cpp
+    MaterialManager.cpp
+    GPUNormalMapManager.cpp
+    Mesh.cpp
+    Noise/Noise.cpp
+    Noise/Perlin/Perlin.cpp
+    Noise/FFT/FFT.cpp
+    Modules/Module.cpp
+    Modules/ProjectedGrid/ProjectedGrid.cpp
+    Modules/RadialGrid/RadialGrid.cpp
+    Modules/SimpleGrid/SimpleGrid.cpp
+)
+
+include_directories (.)
+
+add_library(ibex_hydrax SHARED ${HEADER_FILES} ${SOURCE_FILES})
+target_link_libraries(ibex_hydrax ${Boost_LIBRARIES} ${OGRE_LIBRARIES} ${OIS_LIBRARIES} ${OGRE_LIBS})
+
+install(TARGETS ibex_hydrax
+     RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/ibex.app/Contents/MacOS/" COMPONENT libraries
+     LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/ibex.app/Contents/MacOS/" COMPONENT libraries
+     ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/ibex.app/Contents/MacOS/" COMPONENT libraries)

File IbexMac/Dependencies/Hydrax/CfgFileManager.cpp

+/*
+--------------------------------------------------------------------------------
+This source file is part of Hydrax.
+Visit ---
+
+Copyright (C) 2008 Xavier Vergu�n Gonz�lez <xavierverguin@hotmail.com>
+                                           <xavyiy@gmail.com>
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place - Suite 330, Boston, MA 02111-1307, USA, or go to
+http://www.gnu.org/copyleft/lesser.txt.
+--------------------------------------------------------------------------------
+*/
+
+#include "CfgFileManager.h"
+
+#include "Hydrax.h"
+
+namespace Hydrax
+{
+	CfgFileManager::CfgFileManager(Hydrax* h)
+		: mHydrax(h)
+	{
+	}
+
+	CfgFileManager::~CfgFileManager()
+	{
+	}
+
+	const bool CfgFileManager::load(const Ogre::String& File) const
+	{
+		std::pair<bool, Ogre::ConfigFile> CfgFileResult; 
+		_loadCfgFile(File, CfgFileResult);
+	
+		if (!CfgFileResult.first)
+		{
+			return false;
+		}
+
+		Ogre::ConfigFile &CfgFile = CfgFileResult.second;
+
+		if (!_checkVersion(CfgFile))
+		{
+			return false;
+		}
+
+		// Load main options
+		mHydrax->setPosition(_getVector3Value(CfgFile,"Position"));
+		mHydrax->setPlanesError(_getFloatValue(CfgFile,"PlanesError"));
+		mHydrax->setShaderMode(static_cast<MaterialManager::ShaderMode>(_getIntValue(CfgFile, "ShaderMode")));
+		mHydrax->setFullReflectionDistance(_getFloatValue(CfgFile,"FullReflectionDistance"));
+		mHydrax->setGlobalTransparency(_getFloatValue(CfgFile,"GlobalTransparency"));
+		mHydrax->setNormalDistortion(_getFloatValue(CfgFile,"NormalDistortion"));
+		mHydrax->setWaterColor(_getVector3Value(CfgFile,"WaterColor"));
+
+		// Load components settings
+		_loadComponentsSettings(CfgFile);
+
+		// Load rtt settings
+		_loadRttSettings(CfgFile);
+
+		// Load module and noise settings
+		if (mHydrax->getModule())
+		{
+			mHydrax->getModule()->loadCfg(CfgFile);
+
+			if (mHydrax->getModule()->getNoise())
+			{
+				mHydrax->getModule()->getNoise()->loadCfg(CfgFile);
+			}
+		}
+
+		return true;
+	}
+
+	const bool CfgFileManager::save(const Ogre::String& File, const Ogre::String& Path) const
+	{
+		Ogre::String Data = 
+			"#Hydrax cfg file.\n\n";
+
+		Data += "#Hydrax version field\n";
+		Data += _getVersionCfgString();
+
+		Data += "#Main options field\n";
+		Data += _getCfgString("Position",               mHydrax->getPosition());
+		Data += _getCfgString("PlanesError",            mHydrax->getPlanesError());
+		Data += "#Shader mode: 0=HLSL, 1=CG, 2=GLSL\n";
+		Data += _getCfgString("ShaderMode",             static_cast<int>(mHydrax->getShaderMode()));
+		Data += _getCfgString("FullReflectionDistance", mHydrax->getFullReflectionDistance());
+		Data += _getCfgString("GlobalTransparency",     mHydrax->getGlobalTransparency());
+		Data += _getCfgString("NormalDistortion",       mHydrax->getNormalDistortion()); 
+		Data += _getCfgString("WaterColor",             mHydrax->getWaterColor()); Data += "\n";
+
+		Data += "#Components field\n";
+		Data += _getComponentsCfgString();
+
+		Data += "#Rtt quality field(0x0 = Auto)\n";
+		Data += _getRttCfgString(); Data += "\n";
+
+		if (mHydrax->getModule())
+		{
+			mHydrax->getModule()->saveCfg(Data);
+
+			if (mHydrax->getModule()->getNoise())
+			{
+				mHydrax->getModule()->getNoise()->saveCfg(Data);
+			}
+		}
+
+		return _saveToFile(Data, File, Path);
+	}
+
+	const bool CfgFileManager::getSaveString(Ogre::String& Data) const
+	{
+		Data = "#Hydrax cfg file.\n\n";
+
+		Data += "#Hydrax version field\n";
+		Data += _getVersionCfgString();
+
+		Data += "#Main options field\n";
+		Data += _getCfgString("Position",               mHydrax->getPosition());
+		Data += _getCfgString("PlanesError",            mHydrax->getPlanesError());
+		Data += "#Shader mode: 0=HLSL, 1=CG, 2=GLSL\n";
+		Data += _getCfgString("ShaderMode",             static_cast<int>(mHydrax->getShaderMode()));
+		Data += _getCfgString("FullReflectionDistance", mHydrax->getFullReflectionDistance());
+		Data += _getCfgString("GlobalTransparency",     mHydrax->getGlobalTransparency());
+		Data += _getCfgString("NormalDistortion",       mHydrax->getNormalDistortion()); 
+		Data += _getCfgString("WaterColor",             mHydrax->getWaterColor()); Data += "\n";
+
+		Data += "#Components field\n";
+		Data += _getComponentsCfgString();
+
+		Data += "#Rtt quality field(0x0 = Auto)\n";
+		Data += _getRttCfgString(); Data += "\n";
+
+		if (mHydrax->getModule())
+		{
+			mHydrax->getModule()->saveCfg(Data);
+
+			if (mHydrax->getModule()->getNoise())
+			{
+				mHydrax->getModule()->getNoise()->saveCfg(Data);
+			}
+		}
+
+        return true;
+	}
+
+    const bool CfgFileManager::_saveToFile(const Ogre::String& Data, const Ogre::String& File, const Ogre::String& Path) const
+	{
+		FILE *DestinationFile = fopen((Path+"/"+File).c_str(), "w");
+
+		if (!DestinationFile)
+		{
+			return false;
+		}
+
+		fprintf(DestinationFile, "%s", Data.c_str());
+		fclose(DestinationFile);
+
+		try
+		{
+			Ogre::ResourceGroupManager::getSingleton().removeResourceLocation(Path, HYDRAX_RESOURCE_GROUP);
+		}
+		catch(...)
+		{
+		}
+
+		Ogre::ResourceGroupManager::getSingleton().addResourceLocation(Path, "FileSystem", HYDRAX_RESOURCE_GROUP);
+
+		HydraxLOG(File + " saved in " + Path + " .");
+		
+		return true;
+	}
+
+	const void CfgFileManager::_loadCfgFile(const Ogre::String& File, std::pair<bool,Ogre::ConfigFile> &Result) const
+	{
+		if(!Ogre::ResourceGroupManager::getSingleton().resourceExists(HYDRAX_RESOURCE_GROUP, File))
+		{
+			Result.first = false;
+			HydraxLOG("CfgFileManager::_getCfgFile(...): " + File + " doesn't found in " + HYDRAX_RESOURCE_GROUP + " resource group.");
+
+			return;
+		}
+
+		Result.first = true;
+		Result.second.load(Ogre::ResourceGroupManager::getSingleton().openResource(File, HYDRAX_RESOURCE_GROUP));
+
+		HydraxLOG(File + " loaded.");
+	}
+
+	Ogre::String CfgFileManager::_getCfgString(const Ogre::String &Name, const int &Value)
+	{
+		return "<int>" + Name + "=" + Ogre::StringConverter::toString(Value) + "\n";
+	}
+
+	Ogre::String CfgFileManager::_getCfgString(const Ogre::String &Name, const Ogre::Real &Value)
+	{
+		return "<float>" + Name + "=" + Ogre::StringConverter::toString(Value) + "\n";
+	}
+
+	Ogre::String CfgFileManager::_getCfgString(const Ogre::String &Name, const bool &Value)
+	{
+		return "<bool>" + Name + "=" + Ogre::StringConverter::toString(Value) + "\n";
+	}
+
+	Ogre::String CfgFileManager::_getCfgString(const Ogre::String &Name, const Ogre::Vector2 &Value)
+	{
+		return "<vector2>" + Name + "=" + Ogre::StringConverter::toString(Value.x) + "x" + Ogre::StringConverter::toString(Value.y) + "\n";
+	}
+
+	Ogre::String CfgFileManager::_getCfgString(const Ogre::String &Name, const Ogre::Vector3 &Value)
+	{
+		return "<vector3>" + Name + "=" + Ogre::StringConverter::toString(Value.x) + "x" + Ogre::StringConverter::toString(Value.y) + "x" + Ogre::StringConverter::toString(Value.z) + "\n";
+	}
+
+	Ogre::String CfgFileManager::_getCfgString(const Ogre::String& Name, const Size& Value)
+	{
+		return "<size>" + Name + "=" + Ogre::StringConverter::toString(Value.Width) + "x" + Ogre::StringConverter::toString(Value.Height) + "\n";
+	}
+
+	const Ogre::String CfgFileManager::_getComponentsCfgString() const
+	{
+		Ogre::String Cmpnts = "Components=";
+
+		std::pair<bool, Ogre::String> Cmp[8] = {
+			std::pair<bool, Ogre::String>(mHydrax->isComponent(HYDRAX_COMPONENT_SUN),                    "Sun"), 
+			std::pair<bool, Ogre::String>(mHydrax->isComponent(HYDRAX_COMPONENT_FOAM),                   "Foam"),
+		    std::pair<bool, Ogre::String>(mHydrax->isComponent(HYDRAX_COMPONENT_DEPTH),                  "Depth"),
+		    std::pair<bool, Ogre::String>(mHydrax->isComponent(HYDRAX_COMPONENT_SMOOTH),                 "Smooth"),
+		    std::pair<bool, Ogre::String>(mHydrax->isComponent(HYDRAX_COMPONENT_CAUSTICS),               "Caustics"),
+		    std::pair<bool, Ogre::String>(mHydrax->isComponent(HYDRAX_COMPONENT_UNDERWATER),             "Underwater"),
+		    std::pair<bool, Ogre::String>(mHydrax->isComponent(HYDRAX_COMPONENT_UNDERWATER_REFLECTIONS), "UnderwaterReflections"),
+		    std::pair<bool, Ogre::String>(mHydrax->isComponent(HYDRAX_COMPONENT_UNDERWATER_GODRAYS),     "UnderwaterGodRays"),};
+
+		for (int k = 0; k < 8; k++)
+		{
+			if (Cmp[k].first)
+			{
+				Cmpnts += Cmp[k].second;
+
+				bool isLast = true;
+
+			    for (int u = k+1; u < 8; u++)
+			    {
+				    if (Cmp[u].first)
+				    {
+				    	isLast = false;
+				    }
+			    }
+
+			    if (!isLast)
+			    {
+				    Cmpnts += "|";
+			    }
+			    else
+			    {
+			    	Cmpnts += "\n\n";
+			    }
+			}
+		}
+
+		// Sun parameters
+		if (Cmp[0].first)
+		{
+			Cmpnts += "#Sun parameters\n";
+			Cmpnts += _getCfgString("SunPosition", mHydrax->getSunPosition());
+			Cmpnts += _getCfgString("SunStrength", mHydrax->getSunStrength());
+			Cmpnts += _getCfgString("SunArea",     mHydrax->getSunArea());
+			Cmpnts += _getCfgString("SunColor",    mHydrax->getSunColor()); Cmpnts += "\n";
+		}
+		// Foam parameters
+		if (Cmp[1].first)
+		{
+			Cmpnts += "#Foam parameters\n";
+			Cmpnts += _getCfgString("FoamMaxDistance",  mHydrax->getFoamMaxDistance());
+			Cmpnts += _getCfgString("FoamScale",        mHydrax->getFoamScale());
+			Cmpnts += _getCfgString("FoamStart",        mHydrax->getFoamStart());
+			Cmpnts += _getCfgString("FoamTransparency", mHydrax->getFoamTransparency()); Cmpnts += "\n";
+		}
+		// Depth parameters
+		if (Cmp[2].first)
+		{
+			Cmpnts += "#Depth parameters\n";
+			Cmpnts += _getCfgString("DepthLimit", mHydrax->getDepthLimit()); Cmpnts += "\n";
+		}
+		// Smooth transitions parameters
+		if (Cmp[3].first)
+		{
+			Cmpnts += "#Smooth transitions parameters\n";
+			Cmpnts += _getCfgString("SmoothPower", mHydrax->getSmoothPower()); Cmpnts += "\n";
+		}
+		// Caustics parameters
+		if (Cmp[4].first)
+		{
+			Cmpnts += "#Caustics parameters\n";
+			Cmpnts += _getCfgString("CausticsScale", mHydrax->getCausticsScale());
+			Cmpnts += _getCfgString("CausticsPower", mHydrax->getCausticsPower());
+			Cmpnts += _getCfgString("CausticsEnd",   mHydrax->getCausticsEnd()); Cmpnts += "\n";
+		}
+		// God rays parameters
+		if (Cmp[7].first)
+		{
+			Cmpnts += "#God rays parameters\n";
+			Cmpnts += _getCfgString("GodRaysExposure",      mHydrax->getGodRaysExposure());
+			Cmpnts += _getCfgString("GodRaysIntensity",     mHydrax->getGodRaysIntensity()); 
+			Cmpnts += _getCfgString("GodRaysSpeed",         mHydrax->getGodRaysManager()->getSimulationSpeed());
+			Cmpnts += _getCfgString("GodRaysNumberOfRays",  mHydrax->getGodRaysManager()->getNumberOfRays()); 
+			Cmpnts += _getCfgString("GodRaysRaysSize",      mHydrax->getGodRaysManager()->getRaysSize()); 
+			Cmpnts += _getCfgString("GodRaysIntersections", mHydrax->getGodRaysManager()->areObjectsIntersectionsEnabled()); Cmpnts += "\n";
+		}
+
+		return Cmpnts;
+	}
+
+	bool CfgFileManager::_isStringInList(const Ogre::StringVector &List, const Ogre::String &Find)
+	{
+		for (unsigned int k = 0; k < List.size(); k++)
+		{
+			if (List[k] == Find)
+			{
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+	const void CfgFileManager::_loadComponentsSettings(Ogre::ConfigFile& CfgFile) const
+	{
+		Ogre::StringVector Cmpnts = Ogre::StringUtil::split(CfgFile.getSetting("Components"), "|");
+
+		HydraxComponent ComponentsToLoad[8] = {
+			HYDRAX_COMPONENTS_NONE,HYDRAX_COMPONENTS_NONE,HYDRAX_COMPONENTS_NONE,HYDRAX_COMPONENTS_NONE,
+			HYDRAX_COMPONENTS_NONE,HYDRAX_COMPONENTS_NONE,HYDRAX_COMPONENTS_NONE,HYDRAX_COMPONENTS_NONE};
+
+		if (_isStringInList(Cmpnts, "Sun"))
+		{
+			ComponentsToLoad[0] = HYDRAX_COMPONENT_SUN;
+		}
+		if (_isStringInList(Cmpnts, "Foam"))
+		{
+			ComponentsToLoad[1] = HYDRAX_COMPONENT_FOAM;
+		}
+		if (_isStringInList(Cmpnts, "Depth"))
+		{
+			ComponentsToLoad[2] = HYDRAX_COMPONENT_DEPTH;
+		}
+		if (_isStringInList(Cmpnts, "Smooth"))
+		{
+			ComponentsToLoad[3] = HYDRAX_COMPONENT_SMOOTH;
+		}
+		if (_isStringInList(Cmpnts, "Caustics"))
+		{
+			ComponentsToLoad[4] = HYDRAX_COMPONENT_CAUSTICS;
+		}
+		if (_isStringInList(Cmpnts, "Underwater"))
+		{
+			ComponentsToLoad[5] = HYDRAX_COMPONENT_UNDERWATER;
+		}
+		if (_isStringInList(Cmpnts, "UnderwaterReflections"))
+		{
+			ComponentsToLoad[6] = HYDRAX_COMPONENT_UNDERWATER_REFLECTIONS;
+		}
+		if (_isStringInList(Cmpnts, "UnderwaterGodRays"))
+		{
+			ComponentsToLoad[7] = HYDRAX_COMPONENT_UNDERWATER_GODRAYS;
+		}
+
+		mHydrax->setComponents(static_cast<HydraxComponent>(
+			ComponentsToLoad[0] | ComponentsToLoad[1] | ComponentsToLoad[2] | ComponentsToLoad[3] |
+			ComponentsToLoad[4] | ComponentsToLoad[5] | ComponentsToLoad[6] | ComponentsToLoad[7]));
+		
+		if (_isStringInList(Cmpnts, "Sun"))
+		{
+			mHydrax->setSunPosition(_getVector3Value(CfgFile,"SunPosition"));
+			mHydrax->setSunStrength(_getFloatValue(CfgFile,"SunStrength"));
+			mHydrax->setSunArea(_getFloatValue(CfgFile,"SunArea"));
+			mHydrax->setSunColor(_getVector3Value(CfgFile,"SunColor"));
+		}
+
+		if (_isStringInList(Cmpnts, "Foam"))
+		{
+			mHydrax->setFoamMaxDistance(_getFloatValue(CfgFile,"FoamMaxDistance"));
+			mHydrax->setFoamScale(_getFloatValue(CfgFile,"FoamScale"));
+			mHydrax->setFoamStart(_getFloatValue(CfgFile,"FoamStart"));
+			mHydrax->setFoamTransparency(_getFloatValue(CfgFile,"FoamTransparency"));
+		}
+
+		if (_isStringInList(Cmpnts, "Depth"))
+		{
+			mHydrax->setDepthLimit(_getFloatValue(CfgFile,"DepthLimit"));
+		}
+
+		if (_isStringInList(Cmpnts, "Smooth"))
+		{
+			mHydrax->setSmoothPower(_getFloatValue(CfgFile,"SmoothPower"));
+		}
+
+		if (_isStringInList(Cmpnts, "Caustics"))
+		{
+			mHydrax->setCausticsScale(_getFloatValue(CfgFile,"CausticsScale"));
+			mHydrax->setCausticsPower(_getFloatValue(CfgFile,"CausticsPower"));
+			mHydrax->setCausticsEnd(_getFloatValue(CfgFile,"CausticsEnd"));
+		}
+
+		if (_isStringInList(Cmpnts, "UnderwaterGodRays"))
+		{
+			mHydrax->setGodRaysExposure(_getVector3Value(CfgFile,"GodRaysExposure"));
+			mHydrax->setGodRaysIntensity(_getFloatValue(CfgFile,"GodRaysIntensity"));
+			mHydrax->getGodRaysManager()->setSimulationSpeed(_getFloatValue(CfgFile,"GodRaysSpeed"));
+			mHydrax->getGodRaysManager()->setNumberOfRays(_getIntValue(CfgFile,"GodRaysNumberOfRays"));
+			mHydrax->getGodRaysManager()->setRaysSize(_getFloatValue(CfgFile,"GodRaysRaysSize"));
+			mHydrax->getGodRaysManager()->setObjectIntersectionsEnabled(_getBoolValue(CfgFile,"GodRaysIntersections"));
+		}
+	}
+
+	const Ogre::String CfgFileManager::_getRttCfgString() const
+	{
+		return
+			_getCfgString("Rtt_Quality_Reflection",   mHydrax->getRttManager()->getTextureSize(RttManager::RTT_REFLECTION)) +
+			_getCfgString("Rtt_Quality_Refraction",   mHydrax->getRttManager()->getTextureSize(RttManager::RTT_REFRACTION)) +
+			_getCfgString("Rtt_Quality_Depth",        mHydrax->getRttManager()->getTextureSize(RttManager::RTT_DEPTH)) +
+			_getCfgString("Rtt_Quality_URDepth",      mHydrax->getRttManager()->getTextureSize(RttManager::RTT_DEPTH_REFLECTION)) +
+			_getCfgString("Rtt_Quality_GPUNormalMap", mHydrax->getRttManager()->getTextureSize(RttManager::RTT_GPU_NORMAL_MAP));
+	}
+
+	const void CfgFileManager::_loadRttSettings(Ogre::ConfigFile& CfgFile) const
+	{
+		mHydrax->getRttManager()->setTextureSize(RttManager::RTT_REFLECTION,_getSizeValue(CfgFile,"Rtt_Quality_Reflection"));
+		mHydrax->getRttManager()->setTextureSize(RttManager::RTT_REFRACTION,_getSizeValue(CfgFile,"Rtt_Quality_Refraction"));
+		mHydrax->getRttManager()->setTextureSize(RttManager::RTT_DEPTH,_getSizeValue(CfgFile,"Rtt_Quality_Depth"));
+		mHydrax->getRttManager()->setTextureSize(RttManager::RTT_DEPTH_REFLECTION,_getSizeValue(CfgFile,"Rtt_Quality_URDepth"));
+		mHydrax->getRttManager()->setTextureSize(RttManager::RTT_GPU_NORMAL_MAP,_getSizeValue(CfgFile,"Rtt_Quality_GPUNormalMap"));
+	}
+
+	const Ogre::String CfgFileManager::_getVersionCfgString() const
+	{
+		return "HydraxVersion=" +
+				// Major
+				Ogre::StringConverter::toString(HYDRAX_VERSION_MAJOR)+"." +
+				// Minor
+				Ogre::StringConverter::toString(HYDRAX_VERSION_MINOR)+"." +
+				// Patch
+				Ogre::StringConverter::toString(HYDRAX_VERSION_PATCH)+"\n\n";
+	}
+
+	const bool CfgFileManager::_checkVersion(Ogre::ConfigFile& CfgFile) const
+	{
+		if(CfgFile.getSetting("HydraxVersion") != (
+			    // Major
+				Ogre::StringConverter::toString(HYDRAX_VERSION_MAJOR)+"."+
+				// Minor
+				Ogre::StringConverter::toString(HYDRAX_VERSION_MINOR)+"."+
+				// Patch
+				Ogre::StringConverter::toString(HYDRAX_VERSION_PATCH)))
+		{
+			HydraxLOG("Config file version doesn't correspond with Hydrax version.");
+
+			return false;
+		}
+
+		return true;
+	}
+
+	int CfgFileManager::_getIntValue(Ogre::ConfigFile& CfgFile, const Ogre::String Name)
+	{
+		Ogre::String Value = CfgFile.getSetting("<int>" + Name);
+
+		if (Value == "")
+		{
+			return 0;
+		}
+		else
+		{
+			return Ogre::StringConverter::parseInt(Value);
+		}
+	}
+
+	Ogre::Real CfgFileManager::_getFloatValue(Ogre::ConfigFile& CfgFile, const Ogre::String Name)
+	{
+		Ogre::String Value = CfgFile.getSetting("<float>" + Name);
+
+		if (Value == "")
+		{
+			return 0;
+		}
+		else
+		{
+			return Ogre::StringConverter::parseReal(Value);
+		}
+	}
+
+	bool CfgFileManager::_getBoolValue(Ogre::ConfigFile& CfgFile, const Ogre::String Name)
+	{
+		Ogre::String Value = CfgFile.getSetting("<bool>" + Name);
+
+		if (Value == "")
+		{
+			return false;
+		}
+		else
+		{
+			return Ogre::StringConverter::parseBool(Value);
+		}
+	}
+
+	Ogre::Vector2 CfgFileManager::_getVector2Value(Ogre::ConfigFile& CfgFile, const Ogre::String Name)
+	{
+		Ogre::String Value = CfgFile.getSetting("<vector2>" + Name);
+
+		if (Value == "")
+		{
+			return Ogre::Vector2(0,0);
+		}
+		else
+		{
+			return Ogre::Vector2(Ogre::StringConverter::parseReal(Ogre::StringUtil::split(Value, "x")[0]),
+				                 Ogre::StringConverter::parseReal(Ogre::StringUtil::split(Value, "x")[1]));
+		}
+	}
+
+	Ogre::Vector3 CfgFileManager::_getVector3Value(Ogre::ConfigFile& CfgFile, const Ogre::String Name)
+	{
+		Ogre::String Value = CfgFile.getSetting("<vector3>" + Name);
+
+		if (Value == "")
+		{
+			return Ogre::Vector3(0,0,0);
+		}
+		else
+		{
+			return Ogre::Vector3(Ogre::StringConverter::parseReal(Ogre::StringUtil::split(Value, "x")[0]),
+				                 Ogre::StringConverter::parseReal(Ogre::StringUtil::split(Value, "x")[1]),
+								 Ogre::StringConverter::parseReal(Ogre::StringUtil::split(Value, "x")[2]));
+		}
+	}
+
+	Size CfgFileManager::_getSizeValue(Ogre::ConfigFile& CfgFile, const Ogre::String Name)
+	{
+		Ogre::String Value = CfgFile.getSetting("<size>" + Name);
+
+		if (Value == "")
+		{
+			return Size(0);
+		}
+		else
+		{
+			return Size(Ogre::StringConverter::parseInt(Ogre::StringUtil::split(Value, "x")[0]),
+				        Ogre::StringConverter::parseInt(Ogre::StringUtil::split(Value, "x")[1]));
+		}
+	}
+}

File IbexMac/Dependencies/Hydrax/CfgFileManager.h

+/*
+--------------------------------------------------------------------------------
+This source file is part of Hydrax.
+Visit ---
+
+Copyright (C) 2008 Xavier Vergu�n Gonz�lez <xavierverguin@hotmail.com>
+                                           <xavyiy@gmail.com>
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place - Suite 330, Boston, MA 02111-1307, USA, or go to
+http://www.gnu.org/copyleft/lesser.txt.
+--------------------------------------------------------------------------------
+*/
+
+#ifndef _Hydrax_CfgFileManager_H_
+#define _Hydrax_CfgFileManager_H_
+
+#include "Prerequisites.h"
+
+#include "Help.h"
+
+namespace Hydrax
+{
+	class Hydrax;
+
+	/** Config file manager.
+	    Class to load/save all Hydrax options from/to a config file
+	 */
+	class DllExport CfgFileManager
+	{
+	public:
+		/** Constructor
+		    @param h Hydrax parent pointer
+		 */
+		CfgFileManager(Hydrax *h);
+
+		/** Destructor
+		 */
+        ~CfgFileManager();
+
+		/** Load hydrax cfg file
+		    @param File File name
+			@return false if an error has been ocurred(Check the log file in this case).
+		 */
+		const bool load(const Ogre::String& File) const;
+
+		/** Save current hydrax config to a file
+		    @param File Destination file name
+			@param Path File path
+			@return false if an error has been ocurred(Check the log file in this case).
+		 */
+		const bool save(const Ogre::String& File, const Ogre::String& Path = "") const;
+
+		/** Return current hydrax config as string 
+		    @param Data Destination string to save config in
+			@return false if an error has been ocurred(Check the log file in this case).
+		 */
+        const bool getSaveString(Ogre::String& Data) const;
+
+		/** <int> Get the cfg string
+		    @param Name Parameter name
+		    @param Value Parameter value
+			@return int cfg string
+		 */
+		static Ogre::String _getCfgString(const Ogre::String& Name, const int& Value);
+
+		/** <float> Get the cfg string
+		    @param Name Parameter name
+		    @param Value Parameter value
+			@return Ogre::Real cfg string
+		 */
+		static Ogre::String _getCfgString(const Ogre::String& Name, const Ogre::Real& Value);
+
+		/** <bool> Get the cfg string
+		    @param Name Parameter name
+		    @param Value Parameter value
+			@return bool cfg string
+		 */
+		static Ogre::String _getCfgString(const Ogre::String& Name, const bool& Value);
+
+		/** <vector2> Get the cfg string
+		    @param Name Parameter name
+		    @param Value Parameter value
+			@return Ogre::Vector2 cfg string
+		 */
+		static Ogre::String _getCfgString(const Ogre::String& Name, const Ogre::Vector2& Value);
+
+		/** <vector3> Get the cfg string
+		    @param Name Parameter name
+		    @param Value Parameter value
+			@return Ogre::Vector3 cfg string
+		 */
+		static Ogre::String _getCfgString(const Ogre::String& Name, const Ogre::Vector3& Value);
+
+		/** <size> Get the cfg string
+		    @param Name Parameter name
+		    @param Value Parameter value
+			@return Hydrax::Size cfg string
+		 */
+		static Ogre::String _getCfgString(const Ogre::String& Name, const Size& Value);
+
+		/** Get int value
+		    @param CfgFile Config file
+		    @param Name Parameter name
+			@return int value
+			@remarks if the parameter isn't found or the data type is not an int value, return 0 as default
+		 */
+		static int _getIntValue(Ogre::ConfigFile& CfgFile, const Ogre::String Name);
+
+		/** Get float value
+		    @param CfgFile Config file
+		    @param Name Parameter name
+			@return float value
+			@remarks if the parameter isn't found or the data type is not a float value, return 0 as default
+		 */
+		static Ogre::Real _getFloatValue(Ogre::ConfigFile& CfgFile, const Ogre::String Name);
+
+		/** Get bool value
+		    @param CfgFile Config file
+		    @param Name Parameter name
+			@return bool value
+			@remarks if the parameter isn't found or the data type is not a bool value, return false as default
+		 */
+		static bool _getBoolValue(Ogre::ConfigFile& CfgFile, const Ogre::String Name);
+
+		/** Get vector2 value
+		    @param CfgFile Config file
+		    @param Name Parameter name
+			@return vector2 value
+			@remarks if the parameter isn't found or the data type is not an int value, returns (0,0) as default
+		 */
+		static Ogre::Vector2 _getVector2Value(Ogre::ConfigFile& CfgFile, const Ogre::String Name);
+
+		/** Get vector3 value
+		    @param CfgFile Config file
+		    @param Name Parameter name
+			@return vector3 value
+			@remarks if the parameter isn't found or the data type is not an int value, returns (0,0,0) as default
+		 */
+		static Ogre::Vector3 _getVector3Value(Ogre::ConfigFile& CfgFile, const Ogre::String Name);
+
+		/** Get size value
+		    @param CfgFile Config file
+		    @param Name Parameter name
+			@return size value
+			@remarks if the parameter isn't found or the data type is not an int value, returns (0,0) as default
+		 */
+		static Size _getSizeValue(Ogre::ConfigFile& CfgFile, const Ogre::String Name);
+
+		/** Check is a std::vector<Ogre::String> contains a specified Ogre::String
+		    @param List String list
+			@param Find String to find
+			@return true if it's contained, false if not
+		 */
+		static bool _isStringInList(const Ogre::StringVector &List, const Ogre::String &Find);
+
+	private:
+		/** Save a string in file
+		    @param Data Data
+			@param File Destination file
+			@param Path File path
+			@return false if an error has ocurred
+		 */
+		const bool _saveToFile(const Ogre::String& Data, const Ogre::String& File, const Ogre::String& Path) const;
+
+		/** Load a cfg file in an Ogre::ConfigFile
+		    @param File File name
+			@param Result, std::pair<bool, Ogre::ConfigFile&> First: False if the file isn't in the Hydrax resource group, Second: Ogre::ConfigFile
+		 */
+		const void _loadCfgFile(const Ogre::String& File, std::pair<bool,Ogre::ConfigFile> &Result) const;
+
+		/** Get components config string
+		    @return Components cfg string
+		 */
+		const Ogre::String _getComponentsCfgString() const;
+
+		/** Load components settings
+		    @param CfgFile Config file
+		 */
+		const void _loadComponentsSettings(Ogre::ConfigFile& CfgFile) const;
+
+		/** Get rtt quality config string
+		    @return Rtt quality cfg string
+		 */
+		const Ogre::String _getRttCfgString() const;
+
+		/** Load rtt settings
+		    @param CfgFile Config file
+		 */
+		const void _loadRttSettings(Ogre::ConfigFile& CfgFile) const;
+
+		/** Get hydrax version cfg string
+		    @return Hydrax version cfg string
+		 */
+		const Ogre::String _getVersionCfgString() const;
+
+		/** Check hydrax version cfg file
+		    @param CfgFile Config file
+		    @return true if it's the same version, false if not.
+		 */
+		const bool _checkVersion(Ogre::ConfigFile& CfgFile) const;
+		    
+		/// Hydrax parent pointer
+		Hydrax* mHydrax;
+	};
+};
+
+#endif

File IbexMac/Dependencies/Hydrax/DecalsManager.cpp

+/*
+--------------------------------------------------------------------------------
+This source file is part of Hydrax.
+Visit ---
+
+Copyright (C) 2008 Xavier Vergu�n Gonz�lez <xavierverguin@hotmail.com>
+                                           <xavyiy@gmail.com>
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place - Suite 330, Boston, MA 02111-1307, USA, or go to
+http://www.gnu.org/copyleft/lesser.txt.
+--------------------------------------------------------------------------------
+*/
+
+#include "DecalsManager.h"
+
+#include "Hydrax.h"
+
+namespace Hydrax
+{
+	Decal::Decal(Hydrax *h, const Ogre::String &TextureName, const int& Id)
+		: mHydrax(h)
+		, mTextureName(TextureName)
+		, mId(Id)
+		, mRegisteredPass(0)
+		, mPosition(Ogre::Vector2(0,0))
+		, mSize(Ogre::Vector2(1,1))
+		, mOrientation(Ogre::Radian(0))
+		, mTransparency(1)
+		, mVisible(true)
+	{
+		mProjector = new Ogre::Frustum();
+		mProjector->setProjectionType(Ogre::PT_ORTHOGRAPHIC); 
+		
+		mSceneNode = mHydrax->getSceneManager()->getRootSceneNode()->createChildSceneNode();
+        mSceneNode->attachObject(mProjector);
+		mSceneNode->setPosition(Ogre::Vector3(0,0,0));
+        mSceneNode->setOrientation(Ogre::Quaternion(Ogre::Degree(90), Ogre::Vector3::NEGATIVE_UNIT_X)); 
+
+		setPosition(mPosition);
+		setSize(mSize);
+		setOrientation(mOrientation);
+	}
+
+	Decal::~Decal()
+	{
+		unregister();
+	
+		mSceneNode->getParentSceneNode()->removeAndDestroyChild(mSceneNode->getName());
+
+		delete mProjector;
+	}
+
+	void Decal::registerPass(Ogre::Pass* _Pass)
+	{
+		unregister();
+
+		_Pass->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
+		_Pass->setCullingMode(Ogre::CULL_NONE);
+        _Pass->setDepthBias(1,1);
+        _Pass->setLightingEnabled(false);
+		_Pass->setDepthWriteEnabled(false);
+
+		Ogre::TextureUnitState *DecalTexture = _Pass->createTextureUnitState(mTextureName);
+        DecalTexture->setProjectiveTexturing(true, mProjector);
+		DecalTexture->setTextureAddressingMode(Ogre::TextureUnitState::TAM_CLAMP);
+		DecalTexture->setTextureFiltering(Ogre::FO_LINEAR, Ogre::FO_LINEAR, Ogre::FO_NONE);
+		DecalTexture->setAlphaOperation(Ogre::LBX_MODULATE, Ogre::LBS_TEXTURE, Ogre::LBS_MANUAL, 1.0, mTransparency); 
+
+		mRegisteredPass = _Pass;
+	}
+
+	void Decal::unregister()
+	{
+		if (mRegisteredPass)
+		{
+			mRegisteredPass->getParent()->removePass(mRegisteredPass->getIndex());
+			mRegisteredPass = static_cast<Ogre::Pass*>(NULL);
+		}
+	}
+
+	void Decal::setPosition(const Ogre::Vector2& Position)
+	{
+		mPosition = Position;
+
+		mSceneNode->setPosition(Position.x, 0, Position.y);
+	}
+
+	void Decal::setSize(const Ogre::Vector2& Size)
+	{
+		mSize = Size;
+
+		// This method is only available in the CVS HEAD,
+		// if you have problems compiling, just comment the
+		// following line:
+		mProjector->setOrthoWindow(Size.x, Size.y);
+	}
+
+	void Decal::setOrientation(const Ogre::Radian& Orientation)
+	{
+		mSceneNode->rotate(Ogre::Vector3::UNIT_Z, -mOrientation + Orientation);
+
+		mOrientation = Orientation;
+	}
+
+	void Decal::setTransparency(const Ogre::Real& Transparency)
+	{
+		mTransparency = Transparency;
+
+		if (mRegisteredPass)
+		{
+			mRegisteredPass->getTextureUnitState(0)
+				->setAlphaOperation(Ogre::LBX_MODULATE, Ogre::LBS_TEXTURE, Ogre::LBS_MANUAL, 1.0, mTransparency);
+		}
+	}
+
+	void Decal::setVisible(const bool& Visible)
+	{
+		mVisible = Visible;
+
+		unregister();
+
+		mHydrax->getDecalsManager()->_forceToUpdate();
+	}
+
+	// --------------------------------------------------------------------
+
+	DecalsManager::DecalsManager(Hydrax *h)
+		: mHydrax(h)
+		, mNextId(0)
+		, mLastUnderwater(false)
+		, mWaterStrength(5)
+		, mForceToUpdate(false)
+	{
+	}
+
+	DecalsManager::~DecalsManager()
+	{
+		for(DecalIt = mDecals.begin(); DecalIt != mDecals.end(); DecalIt++)
+        {
+			delete (*DecalIt);
+		}
+
+		mDecals.clear();
+	}
+
+	void DecalsManager::update()
+	{
+		if (mHydrax->getCamera()->getDerivedPosition()    == mLastPosition &&
+			mHydrax->getCamera()->getDerivedOrientation() == mLastOrientation && 
+			!mForceToUpdate)
+		{
+			return;
+		}
+
+		if (mForceToUpdate)
+		{
+			mForceToUpdate = false;
+		}
+
+		Ogre::Vector2 DPos;
+		Ogre::Real    HHeight = mHydrax->getPosition().y;
+		Ogre::Vector2 DSize;
+		Ogre::AxisAlignedBox DecalBox;
+
+		if (mLastUnderwater != mHydrax->_isCurrentFrameUnderwater())
+		{
+			for(DecalIt = mDecals.begin(); DecalIt != mDecals.end(); DecalIt++)
+            {
+				if (!(*DecalIt)->isVisible())
+				{
+					continue;
+				}
+
+				if ((*DecalIt)->getRegisteredPass())
+				{
+					(*DecalIt)->unregister();
+
+					if (!mHydrax->_isCurrentFrameUnderwater())
+					{
+					    (*DecalIt)->registerPass(
+				             mHydrax->getMaterialManager()->getMaterial(MaterialManager::MAT_WATER)->
+				                 getTechnique(0)->createPass());
+					}
+					else
+					{
+						(*DecalIt)->registerPass(
+				             mHydrax->getMaterialManager()->getMaterial(MaterialManager::MAT_UNDERWATER)->
+				                 getTechnique(0)->createPass());
+					}
+				}
+
+			}
+		}
+
+		for(DecalIt = mDecals.begin(); DecalIt != mDecals.end(); DecalIt++)
+        {
+			if (!(*DecalIt)->isVisible())
+			{
+				continue;
+			}
+
+			DPos = (*DecalIt)->getPosition();
+			DSize = (*DecalIt)->getSize()/2;
+
+			DecalBox = Ogre::AxisAlignedBox(DPos.x - DSize.x,  HHeight - mWaterStrength, DPos.y - DSize.y,
+				                            DPos.x + DSize.x,  HHeight + mWaterStrength, DPos.y + DSize.y);
+
+			if (mHydrax->getCamera()->isVisible(DecalBox))
+			{
+				if (!(*DecalIt)->getRegisteredPass())
+				{
+					if (!mHydrax->_isCurrentFrameUnderwater())
+					{
+					    (*DecalIt)->registerPass(
+				             mHydrax->getMaterialManager()->getMaterial(MaterialManager::MAT_WATER)->
+				                 getTechnique(0)->createPass());
+					}
+					else
+					{
+						(*DecalIt)->registerPass(
+				             mHydrax->getMaterialManager()->getMaterial(MaterialManager::MAT_UNDERWATER)->
+				                 getTechnique(0)->createPass());
+					}
+				}
+			}
+			else
+			{
+				(*DecalIt)->unregister();
+			}
+		}
+		
+		mLastPosition    = mHydrax->getCamera()->getDerivedPosition();
+		mLastOrientation = mHydrax->getCamera()->getDerivedOrientation();
+		mLastUnderwater  = mHydrax->_isCurrentFrameUnderwater();
+	}
+
+	Decal* DecalsManager::add(const Ogre::String& TextureName)
+	{
+		Decal* NewDecal = new Decal(mHydrax, TextureName, mNextId);
+
+		mDecals.push_back(NewDecal);
+
+		if (mHydrax->getMaterialManager()->isCreated())
+		{
+			NewDecal->registerPass(
+				mHydrax->getMaterialManager()->getMaterial(MaterialManager::MAT_WATER)->
+				     getTechnique(0)->createPass());
+		}
+
+		mNextId++;
+
+		return NewDecal;
+	}
+
+	Decal* DecalsManager::get(const int& Id)
+	{
+		for(DecalIt = mDecals.begin(); DecalIt != mDecals.end(); DecalIt++)
+        {
+            if((*DecalIt)->getId() == Id)
+            {
+				return (*DecalIt);
+            }
+		}
+
+		return static_cast<Decal*>(NULL);
+	}
+
+	void DecalsManager::remove(const int& Id)
+	{
+		for(DecalIt = mDecals.begin(); DecalIt != mDecals.end(); DecalIt++)
+        {
+            if((*DecalIt)->getId() == Id)
+            {
+				delete (*DecalIt);
+				mDecals.erase(DecalIt);
+
+				return;
+            }
+		}
+	}
+
+	void DecalsManager::removeAll()
+	{
+		for(DecalIt = mDecals.begin(); DecalIt != mDecals.end(); DecalIt++)
+        {
+			delete (*DecalIt);
+		}
+
+		mDecals.clear();
+
+		mNextId = 0;
+	}
+
+	void DecalsManager::registerAll()
+	{
+		for(DecalIt = mDecals.begin(); DecalIt != mDecals.end(); DecalIt++)
+        {
+			(*DecalIt)->unregister();
+
+			if (!mHydrax->_isCurrentFrameUnderwater())
+			{
+				(*DecalIt)->registerPass(
+					mHydrax->getMaterialManager()->getMaterial(MaterialManager::MAT_WATER)->
+					   getTechnique(0)->createPass());
+			}
+			else
+			{
+				(*DecalIt)->registerPass(
+					mHydrax->getMaterialManager()->getMaterial(MaterialManager::MAT_UNDERWATER)->
+					   getTechnique(0)->createPass());
+			}
+		}
+	}
+}

File IbexMac/Dependencies/Hydrax/DecalsManager.h

+/*
+--------------------------------------------------------------------------------
+This source file is part of Hydrax.
+Visit ---
+
+Copyright (C) 2008 Xavier Vergu�n Gonz�lez <xavierverguin@hotmail.com>
+                                           <xavyiy@gmail.com>
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place - Suite 330, Boston, MA 02111-1307, USA, or go to
+http://www.gnu.org/copyleft/lesser.txt.
+--------------------------------------------------------------------------------
+*/
+
+#ifndef _Hydrax_DecalsManager_H_
+#define _Hydrax_DecalsManager_H_
+
+#include "Prerequisites.h"
+
+namespace Hydrax
+{
+	class Hydrax;
+
+	/** Decal class.
+	 */
+	class DllExport Decal
+	{
+	public:
+		/** Constructor
+		    @param h Hydrax parent pointer
+			@param TextureName Texture name
+			@param Id Decal Id
+		 */
+		Decal(Hydrax *h, const Ogre::String &TextureName, const int& Id);
+
+		/** Destructor
+		 */
+        ~Decal();
+
+		/** Register the decal int the specified pass
+		    @param _Pass Pass to be registred
+		 */
+		void registerPass(Ogre::Pass* _Pass);
+
+		/** Unregister from current technique
+	     */
+		void unregister();
+
+		/** Get decal texture name
+		    @return Decal texture name
+		 */
+		inline const Ogre::String& getTextureName() const
+		{
+			return mTextureName;
+		}
+
+		/** Get the decal Id
+		    @return Decal Id
+		 */
+		inline const int& getId() const
+		{
+			return mId;
+		}
+
+		/** Get the decal projector
+		    @return Projector frustum
+		 */
+		inline Ogre::Frustum* getProjector()
+		{
+			return mProjector;
+		}
+
+		/** Get the decal scene node
+		    @return Decal scene node
+		 */
+		inline Ogre::SceneNode* getSceneNode()
+		{
+			return mSceneNode;
+		}
+
+		/** Get the pass the decal is in
+		    @return Registered pass
+			@remarks return NULL if decal isn't registered
+		 */
+		inline Ogre::Pass *getRegisteredPass()
+		{
+			return mRegisteredPass;
+		}
+
+		/** Get decal position
+		    @return Decal position
+		 */
+		inline const Ogre::Vector2& getPosition() const
+		{
+			return mPosition;
+		}
+
+		/** Get decal size
+		    @return Decal size
+		 */
+		inline const Ogre::Vector2& getSize() const
+		{
+			return mSize;
+		}
+
+		/** Get decal orientation
+		    @return Decal orientation
+		 */
+		inline const Ogre::Radian& getOrientation() const
+		{
+			return mOrientation;
+		}
+
+		/** Get decal transparency
+		    @return Decal transparency
+		 */
+		inline const Ogre::Real& getTransparency() const
+		{
+			return mTransparency;
+		}
+
+		/** Is decal visile?
+		    @return true if decal is visible
+		 */
+		inline const bool& isVisible() const
+		{
+			return mVisible;
+		}
+
+		/** Set decal position
+		    @param Position Decal position
+		 */
+		void setPosition(const Ogre::Vector2& Position);
+
+		/** Set decal size
+		    @param Size Decal size in world coordinates
+		 */
+		void setSize(const Ogre::Vector2& Size);
+
+		/** Set decal orientation
+		    @param Orientation Decal orientation
+		 */
+		void setOrientation(const Ogre::Radian& Orientation);
+
+		/** Set decal transparency
+		    @param Transparency Decal transparency in [0,1] range
+			@remarks 0 = Full transparent, 1 = Full opacity
+		 */
+		void setTransparency(const Ogre::Real& Transparency);
+
+		/** Set decal visibile or not
+		    @param Visible true if yes, false if not
+		 */
+		void setVisible(const bool& Visible);
+
+	private:
+		/// Decal texture name
+		Ogre::String mTextureName;
+		/// Decal Id
+		int mId;
+		/// Decal projector
+		Ogre::Frustum *mProjector;
+		/// Decal scene node
+		Ogre::SceneNode *mSceneNode;
+		/// Registered pass
+		Ogre::Pass *mRegisteredPass;
+
+		/// Position
+		Ogre::Vector2 mPosition;
+		/// Size
+		Ogre::Vector2 mSize;
+		/// Orientation
+		Ogre::Radian mOrientation;
+		/// Transparency
+		Ogre::Real mTransparency;
+		/// Is decal visible?
+		bool mVisible;
+
+		/// Hydrax parent pointer
+		Hydrax *mHydrax;
+	};
+
+	/** Decals manager class. Use it for place any kind of texture
+	    over the water! Like ship trails, overwater vegetables, ...
+	 */
+	class DllExport DecalsManager
+	{
+	public:
+		/** Constructor
+		    @param h Hydrax parent pointer
+		 */
+		DecalsManager(Hydrax *h);
+
+		/** Destructor
+		 */
+        ~DecalsManager();
+
+		/** Update decal manager
+		    @remarks Call each frame
+		 */
+		void update();
+
+		/** Add decal
+		    @param TextureName Texture name
+			@return Hydrax::Decal* Use it as a usual Ogre::SceneNode(Decal::getSceneNode()) for position, rotate...etc!
+		 */
+		Decal* add(const Ogre::String& TextureName);
+
+		/** Get decal 
+		    @param Id Decal Id
+			@return Hydrax::Decal*
+		 */
+		Decal* get(const int& Id);
+
+		/** Remove decal
+		    @param Id Decal Id
+		 */
+		void remove(const int& Id);
+
+		/** Remove all decals
+		 */
+		void removeAll();
+
+		/** Register all decals
+		    @remarks Use it when water material is (re)created
+		 */
+		void registerAll();
+
+		/** Get decals std::vector
+		    @return std::vector<Decal*> list
+		 */
+		inline std::vector<Decal*> getDecals()
+		{
+			return mDecals;
+		}
+
+		/** Get water strength (used for decals culling)
+		    @return Water strength
+		 */
+		inline const Ogre::Real _getWaterStrength() const
+		{
+			return mWaterStrength;
+		}
+
+		/** Set water strength (used for decals culling)
+		    @param WaterStrength Water strength
+		 */
+		inline void _setWaterStrength(const Ogre::Real &WaterStrength)
+		{
+			mWaterStrength = WaterStrength;
+		}
+
+		/** Call to force to update decals
+		 */
+		inline void _forceToUpdate()
+		{
+			mForceToUpdate = true;
+		}
+
+	private:
+		/// Decals std::vector
+		std::vector<Decal*> mDecals;
+		/// Decal iterator
+		std::vector<Decal*>::iterator DecalIt;
+		/// Next Id
+		int mNextId;
+
+		/// Water strength (For decals culling)
+		Ogre::Real mWaterStrength;
+
+		/// Last camera position, orientation, underwater
+		Ogre::Vector3 mLastPosition;
+		Ogre::Quaternion mLastOrientation;
+		bool mLastUnderwater;
+		bool mForceToUpdate;
+		
+		/// Hydrax parent pointer
+		Hydrax *mHydrax;
+	};
+};
+
+#endif

File IbexMac/Dependencies/Hydrax/Enums.cpp

+/*
+--------------------------------------------------------------------------------
+This source file is part of Hydrax.
+Visit ---
+
+Copyright (C) 2008 Xavier Vergu�n Gonz�lez <xavierverguin@hotmail.com>
+                                           <xavyiy@gmail.com>
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place - Suite 330, Boston, MA 02111-1307, USA, or go to
+http://www.gnu.org/copyleft/lesser.txt.
+--------------------------------------------------------------------------------
+*/
+
+#include "Enums.h"
+
+namespace Hydrax
+{
+
+}

File IbexMac/Dependencies/Hydrax/Enums.h

+/*
+--------------------------------------------------------------------------------
+This source file is part of Hydrax.
+Visit ---
+
+Copyright (C) 2008 Xavier Vergu�n Gonz�lez <xavierverguin@hotmail.com>
+                                           <xavyiy@gmail.com>
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along with
+this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+Place - Suite 330, Boston, MA 02111-1307, USA, or go to
+http://www.gnu.org/copyleft/lesser.txt.
+--------------------------------------------------------------------------------
+*/
+
+#ifndef _Hydrax_Enums_H_
+#define _Hydrax_Enums_H_
+
+#include "Prerequisites.h"
+
+namespace Hydrax
+{
+    /** Texture quality enumeration(2^n)
+     */
+    DllExport enum TextureQuality
+    {