Index: /GTP/trunk/Lib/Illum/GPUObscurancesGT/include/CMesh.h
===================================================================
--- /GTP/trunk/Lib/Illum/GPUObscurancesGT/include/CMesh.h	(revision 930)
+++ /GTP/trunk/Lib/Illum/GPUObscurancesGT/include/CMesh.h	(revision 953)
@@ -112,4 +112,5 @@
 	void parseArgs(char *argv, XmlOptions &opts);
 	void meshToXML(XmlOptions opts);
+	float getValue(const char *string, int &i);
 	void XMLToSNStr(char *name);
 	void NormalizeIt(wxProgressDialog &dialog);
Index: /GTP/trunk/Lib/Illum/GPUObscurancesGT/scripts/OgreMemory.log
===================================================================
--- /GTP/trunk/Lib/Illum/GPUObscurancesGT/scripts/OgreMemory.log	(revision 930)
+++ /GTP/trunk/Lib/Illum/GPUObscurancesGT/scripts/OgreMemory.log	(revision 953)
@@ -1,5 +1,5 @@
 --------------------------------------------------------------------------------
 
-      OgreMemory.log - Memory logging file created on Mon May 08 15:08:46 2006
+      OgreMemory.log - Memory logging file created on Wed May 10 11:47:45 2006
 
 --------------------------------------------------------------------------------
Index: /GTP/trunk/Lib/Illum/GPUObscurancesGT/scripts/XMLConverter.vcproj
===================================================================
--- /GTP/trunk/Lib/Illum/GPUObscurancesGT/scripts/XMLConverter.vcproj	(revision 930)
+++ /GTP/trunk/Lib/Illum/GPUObscurancesGT/scripts/XMLConverter.vcproj	(revision 953)
@@ -21,5 +21,5 @@
 				AdditionalOptions="/Zm150"
 				Optimization="0"
-				AdditionalIncludeDirectories="L:\wx\include;L:\wx\contrib\include;L:\Ogre3D\ogrenew\OgreMain\include;L:\wx\include\msvc;L:\wx\contrib\include\wx"
+				AdditionalIncludeDirectories="L:\wx\include;L:\wx\contrib\include;L:\Ogre3D\ogrenew\OgreMain\include;L:\wx\include\msvc;L:\wx\contrib\include\wx;L:\SergiFR\ogrenew\OgreMain\include;L:\SergiFR\ogrenew\Tools\GPUObscurancesGT\include;L:\SergiFR\ogrenew\Tools\GPUObscurancesGT\Bitmaps"
 				PreprocessorDefinitions="TIXML_USE_STL;"
 				MinimalRebuild="TRUE"
@@ -38,5 +38,5 @@
 				Version="0.99"
 				LinkIncremental="2"
-				AdditionalLibraryDirectories="L:\Ogre3D\ogrenew\OgreMain\lib\Debug;L:\wx\lib\vc_lib"
+				AdditionalLibraryDirectories="L:\SergiFR\ogrenew\OgreMain\lib\Debug;L:\wx\lib\vc_lib"
 				IgnoreDefaultLibraryNames=""
 				GenerateDebugInformation="TRUE"
@@ -77,6 +77,6 @@
 				InlineFunctionExpansion="1"
 				OmitFramePointers="TRUE"
-				AdditionalIncludeDirectories="&quot;L:\wxWidgets-2.6.3\include&quot;;&quot;L:\wxWidgets-2.6.3\contrib\include&quot;;L:\Ogre3D\ogrenew\OgreMain\include;&quot;L:\wxWidgets-2.6.3\include\msvc&quot;;&quot;C:\wxWidgets-2.6.3\include\wx\msw&quot;"
-				PreprocessorDefinitions="TIXML_USE_STL;__WXMSW__;_WINDOWS;NOPCH;GLEW_STATIC"
+				AdditionalIncludeDirectories="L:\wx\include;L:\wx\contrib\include;L:\wx\include\msvc;L:\SergiFR\ogrenew\OgreMain\include;L:\SergiFR\ogrenew\Tools\GPUObscurancesGT\include;L:\SergiFR\ogrenew\Tools\GPUObscurancesGT\Bitmaps"
+				PreprocessorDefinitions="TIXML_USE_STL;__WXMSW__;_WINDOWS;NOPCH"
 				StringPooling="TRUE"
 				RuntimeLibrary="2"
@@ -90,9 +90,9 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="OgreMain.lib wxmsw26_gl.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib oleacc.lib odbc32.lib"
+				AdditionalDependencies="OgreMain.lib wxmsw26_gl.lib wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib oleacc.lib odbc32.lib glew32.lib"
 				OutputFile="$(OutDir)/GPUObscurancesOgre3D.exe"
 				Version="0.99"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="L:\Ogre3D\ogrenew\OgreMain\lib\Release"
+				AdditionalLibraryDirectories="L:\wx\lib\vc_lib;L:\SergiFR\ogrenew\OgreMain\lib\Release"
 				IgnoreDefaultLibraryNames="libc.lib, libci.lib, msvcrt.lib"
 				GenerateDebugInformation="TRUE"
Index: /GTP/trunk/Lib/Illum/GPUObscurancesGT/scripts/OgreLeaks.log
===================================================================
--- /GTP/trunk/Lib/Illum/GPUObscurancesGT/scripts/OgreLeaks.log	(revision 930)
+++ /GTP/trunk/Lib/Illum/GPUObscurancesGT/scripts/OgreLeaks.log	(revision 953)
@@ -1,4 +1,4 @@
  ---------------------------------------------------------------------------------------------------------------------------------- 
-|                                          Memory leak report for:  05/08/2006 15:08:50                                            |
+|                                          Memory leak report for:  05/10/2006 11:54:57                                            |
  ---------------------------------------------------------------------------------------------------------------------------------- 
 
Index: /GTP/trunk/Lib/Illum/GPUObscurancesGT/src/CMesh.cpp
===================================================================
--- /GTP/trunk/Lib/Illum/GPUObscurancesGT/src/CMesh.cpp	(revision 930)
+++ /GTP/trunk/Lib/Illum/GPUObscurancesGT/src/CMesh.cpp	(revision 953)
@@ -95,11 +95,35 @@
 }
 
+float CMesh::getValue(const char *string, int &i)
+{
+	int j = 0;
+	float value;
+	char substring[100];
+
+	while ((string[i] != ' ') && (string[i] != '\0'))
+	{
+		substring[j] = string[i];
+		i++;
+		j++;
+	}
+
+	substring[j] = '\0';
+
+	value = atof(substring);
+
+	return (value);
+
+}
+
 void CMesh::XMLToSNStr(char *name)
 {
 	int i = 0, j = 0, k;
-	bool cont = true;
+	const char *string;
+	bool cont = true, color = false;
 
 	// Read root element and decide from there what type
     String response;
+	String::iterator iter;
+
 	TiXmlDocument* doc = new TiXmlDocument(name);
     // Some double-parsing here but never mind	
@@ -194,4 +218,9 @@
 		tri = tri->FirstChildElement("vertexbuffer");
 
+		const char *cad = tri->Attribute("colours_diffuse");
+
+		if (!strcmp(cad, "true")) color = true;
+
+
 		m_pObject._geo[0]._triSet[i]._numVer = NVer;
 		
@@ -225,13 +254,25 @@
 			m_pObject._geo[0]._triSet[i]._tex[2 * j + 1] = atof(aux1->Attribute("v"));
 
-			/*->aux1 = aux->FirstChildElement("colour_diffuse");
+			aux1 = aux->FirstChildElement("colour_diffuse");
 			response = aux1->Attribute("value");
-			/*->m_pObject._geo[0]._triSet[i]._ver[3 * j] = atof(aux1->Attribute("x"));
-			m_pObject._geo[0]._triSet[i]._ver[3 * j + 1] = atof(aux1->Attribute("y"));
-			m_pObject._geo[0]._triSet[i]._ver[3 * j + 2] = atof(aux1->Attribute("z"));*/
-
-			m_pObject._geo[0]._triSet[i]._refl[3 * j] = 0.5;
-			m_pObject._geo[0]._triSet[i]._refl[3 * j + 1] = 0.5;
-			m_pObject._geo[0]._triSet[i]._refl[3 * j + 2] = 0.5;
+
+			if (color)
+			{
+				string = response.c_str();			
+				k = 0;
+				m_pObject._geo[0]._triSet[i]._refl[3 * j] = getValue(string, k);
+				k++;
+				m_pObject._geo[0]._triSet[i]._refl[3 * j + 1] = getValue(string, k);
+				k++;
+				m_pObject._geo[0]._triSet[i]._refl[3 * j + 2] = getValue(string, k);
+				k++;
+				getValue(string, k);
+			}
+			else
+			{
+				m_pObject._geo[0]._triSet[i]._refl[3 * j] = 0.5;
+				m_pObject._geo[0]._triSet[i]._refl[3 * j + 1] = 0.5;
+				m_pObject._geo[0]._triSet[i]._refl[3 * j + 2] = 0.5;
+			}
 
 			aux = aux->NextSiblingElement();
Index: /GTP/trunk/Lib/Illum/GPUObscurancesGT/src/MyFrame.cpp
===================================================================
--- /GTP/trunk/Lib/Illum/GPUObscurancesGT/src/MyFrame.cpp	(revision 930)
+++ /GTP/trunk/Lib/Illum/GPUObscurancesGT/src/MyFrame.cpp	(revision 953)
@@ -226,7 +226,5 @@
 	float r_float;
 
-	i = 0;
-	j = 0;	
-	while (i < (res * res * 4))
+	for (i = 0, j = 0; i < (res * res * 4); i += 4, j += 3)
 	{
 		r_float = ObscuranceMap[i] * 255;
@@ -236,7 +234,4 @@
 		r_float = ObscuranceMap[i+2] * 255;
 		bmp[j + 2] = uchar(r_float);
-
-		j += 3;
-		i += 4;
 	}
 
Index: /GTP/trunk/Lib/Illum/GPUObscurancesGT/bin/debug/OgreLeaks.log
===================================================================
--- /GTP/trunk/Lib/Illum/GPUObscurancesGT/bin/debug/OgreLeaks.log	(revision 930)
+++ /GTP/trunk/Lib/Illum/GPUObscurancesGT/bin/debug/OgreLeaks.log	(revision 953)
@@ -1,4 +1,4 @@
  ---------------------------------------------------------------------------------------------------------------------------------- 
-|                                          Memory leak report for:  05/08/2006 14:33:47                                            |
+|                                          Memory leak report for:  05/12/2006 14:21:44                                            |
  ---------------------------------------------------------------------------------------------------------------------------------- 
 
Index: /GTP/trunk/Lib/Illum/GPUObscurancesGT/bin/debug/OgreMemory.log
===================================================================
--- /GTP/trunk/Lib/Illum/GPUObscurancesGT/bin/debug/OgreMemory.log	(revision 930)
+++ /GTP/trunk/Lib/Illum/GPUObscurancesGT/bin/debug/OgreMemory.log	(revision 953)
@@ -1,5 +1,5 @@
 --------------------------------------------------------------------------------
 
-      OgreMemory.log - Memory logging file created on Mon May 08 14:32:00 2006
+      OgreMemory.log - Memory logging file created on Fri May 12 14:21:38 2006
 
 --------------------------------------------------------------------------------
