Changeset 6579 in orxonox.OLD for branches/height_map_merge/src/world_entities
- Timestamp:
- Jan 18, 2006, 3:55:37 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/height_map_merge/src/world_entities/terrain.cc
r6496 r6579 43 43 this->loadParams(root); 44 44 45 this->heightMapMaterial = new Material(); 46 heightMapMaterial->setTransparency(1.0); 47 heightMapMaterial->setIllum(0.2); 48 49 heightMapMaterial->setDiffuse(1.0,1.0,1.0); 50 heightMapMaterial->setAmbient(1.0,1.0,1.0 ); 51 heightMapMaterial->setSpecular(1.0,1.0,1.0); 52 heightMapMaterial->setShininess(.5); 53 heightMapMaterial->setTransparency(1.0); 54 55 heightMapMaterial->diffuseTexture = NULL; 56 heightMapMaterial->ambientTexture = NULL; 57 heightMapMaterial->specularTexture = NULL; 58 59 const char* texture_name = "pictures/ground.tga"; 60 heightMapMaterial->setDiffuseMap(texture_name); 61 heightMapMaterial->setAmbientMap(texture_name); 62 heightMapMaterial->setSpecularMap(texture_name); 63 45 64 // if (this->model != NULL) 46 65 //this->ssp = new SpatialSeparation((Model*)this->model, 10.0f); … … 135 154 136 155 this->heightMap = new HeightMap(hmName, hmColorName); 156 heightMap->scale(Vector(23.0f,3.5f,23.0f)); 157 heightMap->shift(Vector(-1000.0,-90.0,-4000.0)); 158 heightMap->load(); 137 159 delete[] hmName; 138 160 delete[] hmColorName; … … 187 209 this->vegetation->draw(); 188 210 189 if(this->heightMap != NULL) 190 this->heightMap->draw(); 211 if(this->heightMap) 212 { 213 this->heightMapMaterial->select(); 214 215 216 // glEnable(GL_LIGHTING); 217 glColorMaterial ( GL_FRONT_AND_BACK, GL_EMISSION ) ; 218 glEnable (GL_COLOR_MATERIAL) ; 219 this->heightMap->draw(); 220 } 191 221 glPopMatrix(); 192 222
Note: See TracChangeset
for help on using the changeset viewer.