Changeset 6467 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Jan 11, 2006, 11:46:52 AM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/grid.cc
r6458 r6467 33 33 this->_sizeX = sizeX; 34 34 this->_sizeY = sizeY; 35 this->_gridSpacingX = sizeX / rows;36 this->_gridSpacingY = sizeY / columns;35 this->_gridSpacingX = sizeX / (float)rows; 36 this->_gridSpacingY = sizeY / (float)columns; 37 37 } 38 38 … … 53 53 for (unsigned int j = 1; j < this->_columns-1; j++) 54 54 { 55 Vector test( 56 (this->vertex(i*_columns+j).y + this->vertex((i-1)*_columns+j).y - this->vertex((i+1)*_columns+j).y ) /maxHeight, 57 1.0, 58 (this->vertex(i*_columns+j).y - this->vertex(i*_columns+j-1).y + this->vertex(i*_columns+j+1).y)/maxHeight 59 ); 55 /* 56 Vector test( this->_gridSpacingX/(this->vertex(i*_columns+j).y - this->vertex(i*_columns+j-1).y) + 57 this->_gridSpacingX/(this->vertex(i*_columns+j+1).y - this->vertex(i*_columns+j).y) 58 , 59 _gridSpacingX, 60 this->_gridSpacingY/(this->vertex(i*_columns+j).y - this->vertex((i-1)*_columns+j).y) + 61 this->_gridSpacingX/(this->vertex((i+1)*_columns+j).y - this->vertex(i*_columns+j).y) 62 );*/ 63 64 65 66 Vector test ( 67 (-this->vertex(i*_columns+j-1).y - this->vertex(i*_columns+j+1).y)/maxHeight, 68 1.0, 69 (-this->vertex((i-1)*_columns+j).y - this->vertex((i+1)*_columns+j).y)/maxHeight 70 ); 71 72 73 // Vector test( 74 // (this->vertex(i*_columns+j).y + this->vertex((i-1)*_columns+j).y - this->vertex((i+1)*_columns+j).y ) /maxHeight, 75 // 1.0, 76 // (this->vertex(i*_columns+j).y - this->vertex(i*_columns+j-1).y + this->vertex(i*_columns+j+1).y)/maxHeight 77 // ); 60 78 this->normal( i*_columns+j) = test.getNormalized(); 61 79 } -
trunk/src/lib/graphics/importer/material.cc
r6295 r6467 274 274 * @param dMap the Name of the Image to Use 275 275 */ 276 void Material::setDiffuseMap(const char* dMap )276 void Material::setDiffuseMap(const char* dMap, GLenum target) 277 277 { 278 278 PRINTF(5)("setting Diffuse Map %s\n", dMap); … … 283 283 //! @todo Textures from .mtl-file need special care. 284 284 if (dMap!= NULL) 285 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME );285 this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (void*)&target); 286 286 else 287 287 this->diffuseTexture = NULL; … … 293 293 @todo implement this 294 294 */ 295 void Material::setAmbientMap(const char* aMap )295 void Material::setAmbientMap(const char* aMap, GLenum target) 296 296 { 297 297 SDL_Surface* ambientMap; … … 304 304 @todo implement this 305 305 */ 306 void Material::setSpecularMap(const char* sMap )306 void Material::setSpecularMap(const char* sMap, GLenum target) 307 307 { 308 308 SDL_Surface* specularMap; -
trunk/src/lib/graphics/importer/material.h
r5866 r6467 44 44 45 45 // MAPPING // 46 void setDiffuseMap(const char* dMap );47 void setAmbientMap(const char* aMap );48 void setSpecularMap(const char* sMap );46 void setDiffuseMap(const char* dMap, GLenum target = GL_TEXTURE_2D); 47 void setAmbientMap(const char* aMap, GLenum target = GL_TEXTURE_2D); 48 void setSpecularMap(const char* sMap, GLenum target = GL_TEXTURE_2D); 49 49 void setBump(const char* bump); 50 50
Note: See TracChangeset
for help on using the changeset viewer.