- Timestamp:
- 12/13/06 16:36:34 (18 years ago)
- Location:
- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCausticCasterRenderTechnique.cpp
r1725 r1886 132 132 true, 133 133 "", 134 false, 134 135 "GameTools/DistanceShader", 135 136 ILLUMRUN_DISTANCE_CUBEMAP); -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreColorCubeMapRenderTechnique.cpp
r1725 r1886 17 17 String environmentMaterial, 18 18 int layer, 19 bool getMinMax, 20 bool attachToTexUnit, 21 String minVariableName, 22 String maxVariableName, 19 23 Pass* pass, 20 24 OgreRenderable* parentRenderable, 21 25 OgreTechniqueGroup* parentTechniqueGroup) 22 :OgreCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, texID, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, selfMaterial, environmentMaterial, layer, pass, parentRenderable, parentTechniqueGroup),26 :OgreCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, texID, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, selfMaterial, environmentMaterial, layer, getMinMax, attachToTexUnit, minVariableName, maxVariableName, pass, parentRenderable, parentTechniqueGroup), 23 27 ColorCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, layer, parentRenderable, parentTechniqueGroup), 24 28 CubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, layer, parentRenderable, parentTechniqueGroup), … … 75 79 void OgreColorCubeMapRenderTechnique::colorCubeMapRunChanged(RenderingRun* run) 76 80 { 77 OgreCubeMapRenderingRun* cuberun =(OgreCubeMapRenderingRun*) (run->asOgreRenderingRun()); 81 OgreCubeMapRenderTechnique::cubeMapRunChanged(run); 82 /*OgreCubeMapRenderingRun* cuberun =(OgreCubeMapRenderingRun*) (run->asOgreRenderingRun()); 78 83 String cubemapname = cuberun->getCubeMapTextureName(); 84 85 pass->getTextureUnitState(texID)->setTextureName(cubemapname);*/ 79 86 80 pass->getTextureUnitState(texID)->setTextureName(cubemapname);81 87 } 82 88 … … 113 119 environmentMaterial, 114 120 layer, 121 getMinMax, 122 attachToTexUnit, 123 minVariableName, 124 maxVariableName, 115 125 pass, 116 126 parentRenderable, -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreConvolvedCubeMapRenderTechnique.cpp
r1725 r1886 18 18 String selfMaterial, 19 19 String environmentMaterial, 20 bool getMinMax, 21 bool attachToTexUnit, 22 String minVariableName, 23 String maxVariableName, 20 24 Pass* pass, 21 25 OgreRenderable* parentRenderable, 22 26 OgreTechniqueGroup* parentTechniqueGroup) 23 27 : 24 OgreCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, texID, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, selfMaterial, environmentMaterial, layer, pass, parentRenderable, parentTechniqueGroup),28 OgreCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, texID, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, selfMaterial, environmentMaterial, layer, getMinMax, attachToTexUnit, minVariableName, maxVariableName, pass, parentRenderable, parentTechniqueGroup), 25 29 CubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, layer, parentRenderable, parentTechniqueGroup), 26 30 ConvolvedCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, reducedCubeMapResolution, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, parentRenderable, parentTechniqueGroup), … … 127 131 selfMaterial, 128 132 environmentMaterial, 133 getMinMax, 134 attachToTexUnit, 135 minVariableName, 136 maxVariableName, 129 137 pass, 130 138 parentRenderable, -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreCubeMapRenderTechnique.cpp
r1725 r1886 17 17 String environmentMaterial, 18 18 int layer, 19 bool getMinMax, 20 bool attachToTexUnit, 21 String minVariableName, 22 String maxVariableName, 19 23 Pass* pass, 20 24 OgreRenderable* parentRenderable, … … 25 29 RenderTechnique(parentRenderable, parentTechniqueGroup) 26 30 { 31 this->minVariableName = minVariableName; 32 this->maxVariableName = maxVariableName; 33 this->attachToTexUnit = attachToTexUnit; 34 this->getMinMax = getMinMax; 35 27 36 this->texID = texID; 28 37 this->selfMaterial = selfMaterial; … … 50 59 String cubemapname = cuberun->getCubeMapTextureName(); 51 60 52 pass->getTextureUnitState(texID)->setTextureName(cubemapname); 61 if(attachToTexUnit) 62 pass->getTextureUnitState(texID)->setTextureName(cubemapname); 63 if(getMinMax) 64 { 65 if(minVariableName != "") 66 pass->getFragmentProgramParameters()->setNamedConstant(minVariableName, cuberun->getMin()); 67 if(maxVariableName != "") 68 pass->getFragmentProgramParameters()->setNamedConstant(maxVariableName, cuberun->getMax()); 69 } 53 70 } 54 71 … … 69 86 selfMaterial, 70 87 environmentMaterial, 88 getMinMax, 71 89 cubemapLayer); 72 90 } … … 169 187 f->environmentMaterial = params; 170 188 } 189 190 void parseMinVarName(String& params, RenderTechniqueFactory* factory) 191 { 192 OgreCubeMapRenderTechniqueFactory* f = (OgreCubeMapRenderTechniqueFactory*) factory; 193 f->minVariableName = params; 194 } 195 void parseMaxVarName(String& params, RenderTechniqueFactory* factory) 196 { 197 OgreCubeMapRenderTechniqueFactory* f = (OgreCubeMapRenderTechniqueFactory*) factory; 198 f->maxVariableName = params; 199 } 200 171 201 void parseLayer(String& params, RenderTechniqueFactory* factory) 172 202 { 173 203 OgreCubeMapRenderTechniqueFactory* f = (OgreCubeMapRenderTechniqueFactory*) factory; 174 204 f->layer = StringConverter::parseInt(params); 205 } 206 207 void parseGetMinMax(String& params, RenderTechniqueFactory* factory) 208 { 209 OgreCubeMapRenderTechniqueFactory* f = (OgreCubeMapRenderTechniqueFactory*) factory; 210 f->getMinMax = StringConverter::parseBool(params); 211 } 212 213 void parseAttachTexUnit(String& params, RenderTechniqueFactory* factory) 214 { 215 OgreCubeMapRenderTechniqueFactory* f = (OgreCubeMapRenderTechniqueFactory*) factory; 216 f->attachToTexUnit = StringConverter::parseBool(params); 175 217 } 176 218 … … 196 238 this->attributeParsers.insert(AttribParserList::value_type("env_material", (ILLUM_ATTRIBUTE_PARSER) parseEnvMaterial)); 197 239 this->attributeParsers.insert(AttribParserList::value_type("layer", (ILLUM_ATTRIBUTE_PARSER) parseLayer)); 240 this->attributeParsers.insert(AttribParserList::value_type("get_minmax", (ILLUM_ATTRIBUTE_PARSER) parseGetMinMax)); 241 this->attributeParsers.insert(AttribParserList::value_type("attach_to_texture_unit", (ILLUM_ATTRIBUTE_PARSER) parseAttachTexUnit)); 242 this->attributeParsers.insert(AttribParserList::value_type("min_var_name", (ILLUM_ATTRIBUTE_PARSER) parseMinVarName)); 243 this->attributeParsers.insert(AttribParserList::value_type("max_var_name", (ILLUM_ATTRIBUTE_PARSER) parseMaxVarName)); 198 244 199 245 } … … 215 261 environmentMaterial = ""; 216 262 layer = 0; 263 getMinMax = false; 264 attachToTexUnit = true; 265 minVariableName = ""; 266 maxVariableName = ""; 267 217 268 } 218 269 … … 241 292 environmentMaterial, 242 293 layer, 294 getMinMax, 295 attachToTexUnit, 296 minVariableName, 297 maxVariableName, 243 298 pass, 244 299 parentRenderable, -
GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderTechniques/OgreDistanceCubeMapRenderTechnique.cpp
r1725 r1886 17 17 String environmentMaterial, 18 18 int layer, 19 bool getMinMax, 20 bool attachToTexUnit, 21 String minVariableName, 22 String maxVariableName, 19 23 Pass* pass, 20 24 OgreRenderable* parentRenderable, 21 25 OgreTechniqueGroup* parentTechniqueGroup) 22 26 : 23 OgreCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, texID, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, selfMaterial, environmentMaterial, layer, pass, parentRenderable, parentTechniqueGroup),27 OgreCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, texID, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, selfMaterial, environmentMaterial, layer, getMinMax, attachToTexUnit, minVariableName, maxVariableName, pass, parentRenderable, parentTechniqueGroup), 24 28 CubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, layer, parentRenderable, parentTechniqueGroup), 25 29 DistanceCubeMapRenderTechnique(startFrame, cubeMapUpdateInterval, cubeMapResolution, useDistCalc, useFaceAngleCalc, distTolerance, angleTolerance, updateAllFace, renderSelf, renderEnvironment, layer, parentRenderable, parentTechniqueGroup), … … 69 73 void OgreDistanceCubeMapRenderTechnique::distanceCubeMapRunChanged(RenderingRun* run) 70 74 { 71 OgreCubeMapRenderingRun* cuberun =(OgreCubeMapRenderingRun*) (run->asOgreRenderingRun()); 75 OgreCubeMapRenderTechnique::cubeMapRunChanged(run); 76 /* OgreCubeMapRenderingRun* cuberun =(OgreCubeMapRenderingRun*) (run->asOgreRenderingRun()); 72 77 String cubemapname = cuberun->getCubeMapTextureName(); 73 78 74 pass->getTextureUnitState(texID)->setTextureName(cubemapname); 79 pass->getTextureUnitState(texID)->setTextureName(cubemapname);*/ 75 80 } 76 81 … … 118 123 environmentMaterial, 119 124 layer, 125 getMinMax, 126 attachToTexUnit, 127 minVariableName, 128 maxVariableName, 120 129 pass, 121 130 parentRenderable,
Note: See TracChangeset
for help on using the changeset viewer.