Changeset 3658 in orxonox.OLD for orxonox/trunk/src/lib/graphics/importer/material.cc
- Timestamp:
- Mar 27, 2005, 7:44:39 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/material.cc
r3655 r3658 21 21 #include "texture.h" 22 22 #include "debug.h" 23 #include "resource_manager.h" 23 24 #include <stdlib.h> 24 25 #include <string.h> … … 61 62 delete []this->name; 62 63 if (this->diffuseTexture) 63 this->diffuseTexture;64 ResourceManager::unload(this->diffuseTexture); 64 65 if (this->nextMat) 65 66 delete this->nextMat; … … 92 93 this->nextMat = NULL; 93 94 this->name =""; 94 this->setIllum( 1);95 this->setIllum(3); 95 96 this->setDiffuse(0,0,0); 96 97 this->setAmbient(0,0,0); … … 168 169 } 169 170 170 171 171 /** 172 172 \brief Set the Name of the Material. (Important for searching) … … 322 322 void Material::addTexturePath(char* pathName) 323 323 { 324 PathList::getInstance()->addPath(pathName);324 ResourceManager::getInstance()->addImageDir(pathName); 325 325 } 326 326 … … 334 334 { 335 335 PRINTF(4)("setting Diffuse Map %s\n", dMap); 336 diffuseTexture = new Texture();337 this->diffuseTextureSet = diffuseTexture->loadImage(dMap);336 // diffuseTexture = new Texture(); 337 // this->diffuseTextureSet = diffuseTexture->loadImage(dMap); 338 338 339 339 //! \todo check if RESOURCE MANAGER is availiable 340 //this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::load(dMap, IMAGE); 340 //! \todo Textures from .mtl-file need special care. 341 this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::load(dMap, IMAGE); 341 342 } 342 343
Note: See TracChangeset
for help on using the changeset viewer.