Changeset 7055 in orxonox.OLD for trunk/src/world_entities/terrain.cc
- Timestamp:
- Feb 6, 2006, 2:52:14 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/terrain.cc
r7046 r7055 43 43 { 44 44 this->init(); 45 46 45 47 if( root != NULL) 46 48 this->loadParams(root); 47 48 this->heightMapMaterial = new Material();49 heightMapMaterial->setTransparency(1.0);50 51 heightMapMaterial->setDiffuse(0.4,0.4,0.4);52 heightMapMaterial->setAmbient(0.4,0.4,0.4 );53 heightMapMaterial->setSpecular(0.4,0.4,0.4);54 heightMapMaterial->setShininess(.5);55 heightMapMaterial->setTransparency(1.0);56 49 57 50 // if (this->model != NULL) … … 119 112 120 113 this->heightMap = NULL; 121 this->heightMapMaterial = NULL; 114 115 this->heightMapMaterial = new Material(); 122 116 } 123 117 … … 169 163 void Terrain::loadTexture(const char* textureName) 170 164 { 171 if (this->heightMapMaterial != NULL)172 delete this->heightMapMaterial;173 174 this->heightMapMaterial = new Material();175 176 165 PRINTF(0)("Load texture: %s\n", textureName); 177 166 … … 183 172 184 173 heightMapMaterial->setDiffuseMap(textureName); 185 //heightMapMaterial->setAmbientMap(textureName);186 // heightMapMaterial->setSpecularMap(textureName);174 heightMapMaterial->setAmbientMap(textureName); 175 heightMapMaterial->setSpecularMap(textureName); 187 176 } 188 177
Note: See TracChangeset
for help on using the changeset viewer.