Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreConvolvedCubeMapRenderTechnique.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreConvolvedCubeMapRenderTechnique.cpp	(revision 874)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreConvolvedCubeMapRenderTechnique.cpp	(revision 1711)
@@ -8,5 +8,5 @@
 														unsigned int cubeMapResolution,
 														unsigned int reducedCubeMapResolution,
-														unsigned char reducedTexID,
+														unsigned char texID,
 														bool useDistCalc,
 														bool useFaceAngleCalc,
@@ -14,13 +14,14 @@
 														float angleTolerance,
 														bool updateAllFace,
+														bool renderSelf,
 														Pass* pass,
 														OgreRenderable* parentRenderable,
 														OgreTechniqueGroup* parentTechniqueGroup)
-							:OgreRenderTechnique( pass, parentRenderable, parentTechniqueGroup),
-							ConvolvedCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, reducedCubeMapResolution, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, parentRenderable, parentTechniqueGroup),
+							:
+							OgreCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, texID, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, pass, parentRenderable, parentTechniqueGroup),
+							CubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, parentRenderable, parentTechniqueGroup),
+							ConvolvedCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, reducedCubeMapResolution, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, parentRenderable, parentTechniqueGroup),
 							RenderTechnique(parentRenderable, parentTechniqueGroup) 
 {	
-	this->reducedTexID = reducedTexID;
-		
 	if(sharedRuns->getRun(ILLUMRUN_COLOR_CUBEMAP) == 0)
 		sharedRuns->addRun(ILLUMRUN_COLOR_CUBEMAP, createColorCubeMapRun());
@@ -49,5 +50,5 @@
 	String cubemapname = cuberun->getReducedCubeMapTextureName();
 	
-	pass->getTextureUnitState(reducedTexID)->setTextureName(cubemapname);
+	pass->getTextureUnitState(texID)->setTextureName(cubemapname);
 }
 
@@ -94,80 +95,9 @@
 namespace ConvolvedCubemapParsers
 {
-	void parseStartFrame(String& params, RenderTechniqueFactory* factory)
-	{
-		OgreConvoledCubeMapRenderTechniqueFactory* f = (OgreConvoledCubeMapRenderTechniqueFactory*) factory;
-		f->startFrame =  StringConverter::parseUnsignedLong(params);
-	}
-	void parseCubeMapUpdateInterval(String& params, RenderTechniqueFactory* factory)
-	{
-		OgreConvoledCubeMapRenderTechniqueFactory* f = (OgreConvoledCubeMapRenderTechniqueFactory*) factory;
-		f->cubeMapUpdateInterval =  StringConverter::parseUnsignedLong(params);
-	}
-
-	void parseCubeMapResolution(String& params, RenderTechniqueFactory* factory)
-	{
-		OgreConvoledCubeMapRenderTechniqueFactory* f = (OgreConvoledCubeMapRenderTechniqueFactory*) factory;
-		f->cubeMapResolution =  StringConverter::parseUnsignedInt(params);
-	}
-
 	void parseReducedCubeMapResolution(String& params, RenderTechniqueFactory* factory)
 	{
 		OgreConvoledCubeMapRenderTechniqueFactory* f = (OgreConvoledCubeMapRenderTechniqueFactory*) factory;
 		f->reducedCubeMapResolution =  StringConverter::parseUnsignedInt(params);
-	}
-
-	void parseTexID(String& params, RenderTechniqueFactory* factory)
-	{
-		OgreConvoledCubeMapRenderTechniqueFactory* f = (OgreConvoledCubeMapRenderTechniqueFactory*) factory;
-		f->texID =  StringConverter::parseUnsignedInt(params);
-	}
-
-	void parseUseDistCalc(String& params, RenderTechniqueFactory* factory)
-	{
-		OgreConvoledCubeMapRenderTechniqueFactory* f = (OgreConvoledCubeMapRenderTechniqueFactory*) factory;
-		// format: on/off tolerance(float)
-		StringVector vecparams = StringUtil::split(params, " \t");
-
-		if(StringConverter::parseBool(vecparams[0]))//on
-		{
-			f->useDistCalc = true;
-
-			if(vecparams.size()>1)
-			{			
-				f->distTolerance = StringConverter::parseReal(vecparams[1]);
-			}
-		}
-		else
-		{
-			f->useDistCalc = false;
-		}
-	}
-
-	void parseUseFaceAngleCalc(String& params, RenderTechniqueFactory* factory)
-	{
-		OgreConvoledCubeMapRenderTechniqueFactory* f = (OgreConvoledCubeMapRenderTechniqueFactory*) factory;
-		// format: on/off tolerance(float)
-		StringVector vecparams = StringUtil::split(params, " \t");
-
-		if(StringConverter::parseBool(vecparams[0]))//on
-		{
-			f->useFaceAngleCalc = true;
-
-			if(vecparams.size()>1)
-			{			
-				f->angleTolerance = StringConverter::parseReal(vecparams[1]);
-			}
-		}
-		else
-		{
-			f->useFaceAngleCalc = false;
-		}
-	}
-
-	void parseUpdateAllFace(String& params, RenderTechniqueFactory* factory)
-	{
-		OgreConvoledCubeMapRenderTechniqueFactory* f = (OgreConvoledCubeMapRenderTechniqueFactory*) factory;
-		f->updateAllFace =  StringConverter::parseBool(params);
-	}
+	}	
 }
 ///Technique factory
@@ -177,14 +107,5 @@
 
 	using namespace ConvolvedCubemapParsers;
-	//register parsers
-	this->attributeParsers.insert(AttribParserList::value_type("start_frame", (ILLUM_ATTRIBUTE_PARSER) parseStartFrame));
-	this->attributeParsers.insert(AttribParserList::value_type("update_interval", (ILLUM_ATTRIBUTE_PARSER) parseCubeMapUpdateInterval));
-	this->attributeParsers.insert(AttribParserList::value_type("resolution", (ILLUM_ATTRIBUTE_PARSER) parseCubeMapResolution));
-	this->attributeParsers.insert(AttribParserList::value_type("reduced_resolution", (ILLUM_ATTRIBUTE_PARSER) parseReducedCubeMapResolution));
-	this->attributeParsers.insert(AttribParserList::value_type("texture_unit_id", (ILLUM_ATTRIBUTE_PARSER) parseTexID));
-	this->attributeParsers.insert(AttribParserList::value_type("distance_calc", (ILLUM_ATTRIBUTE_PARSER) parseUseDistCalc));
-	this->attributeParsers.insert(AttribParserList::value_type("face_angle_calc", (ILLUM_ATTRIBUTE_PARSER) parseUseFaceAngleCalc));
-	this->attributeParsers.insert(AttribParserList::value_type("update_all_face", (ILLUM_ATTRIBUTE_PARSER) parseUpdateAllFace));
-
+	this->attributeParsers.insert(AttribParserList::value_type("reduced_resolution", (ILLUM_ATTRIBUTE_PARSER) parseReducedCubeMapResolution));	
 }
 
@@ -195,16 +116,8 @@
 										OgreTechniqueGroup* parentTechniqueGroup)
 {	
-	//reset parameters
-	startFrame = 1;
-	cubeMapUpdateInterval = 1;
-	cubeMapResolution = 256;
 	reducedCubeMapResolution = 8;	
-	texID = 0;
-	useDistCalc = 1;
-	useFaceAngleCalc = false;
-	distTolerance = 2.0;
-	angleTolerance = 2.0;
-	updateAllFace = false;
 
+	OgreCubeMapRenderTechniqueFactory::resetParams();
+	OgreCubeMapRenderTechniqueFactory::parseParams(params);	
 	parseParams(params);
 
@@ -220,4 +133,5 @@
 												angleTolerance,
 												updateAllFace,
+												renderSelf,
 												pass,
 												parentRenderable,
