Changeset 3746 in orxonox.OLD for orxonox/branches/levelloader/src/lib/graphics/importer/material.cc
- Timestamp:
- Apr 7, 2005, 3:54:49 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/src/lib/graphics/importer/material.cc
r3605 r3746 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> 26 27 //! \todo check if we are in RESOURCE MANAGER-mode 28 #include "resource_manager.h" 25 29 26 30 using namespace std; … … 58 62 delete []this->name; 59 63 if (this->diffuseTexture) 60 this->diffuseTexture;64 ResourceManager::getInstance()->unload(this->diffuseTexture); 61 65 if (this->nextMat) 62 66 delete this->nextMat; … … 89 93 this->nextMat = NULL; 90 94 this->name =""; 91 this->setIllum( 1);95 this->setIllum(3); 92 96 this->setDiffuse(0,0,0); 93 97 this->setAmbient(0,0,0); … … 104 108 this->ambientTextureSet = false; 105 109 this->specularTextureSet = false; 106 107 108 110 } 109 111 … … 167 169 } 168 170 169 170 171 /** 171 172 \brief Set the Name of the Material. (Important for searching) … … 321 322 void Material::addTexturePath(char* pathName) 322 323 { 323 PathList::getInstance()->addPath(pathName);324 ResourceManager::getInstance()->addImageDir(pathName); 324 325 } 325 326 … … 333 334 { 334 335 PRINTF(4)("setting Diffuse Map %s\n", dMap); 335 diffuseTexture = new Texture(); 336 this->diffuseTextureSet = diffuseTexture->loadImage(dMap); 337 336 // diffuseTexture = new Texture(); 337 // this->diffuseTextureSet = diffuseTexture->loadImage(dMap); 338 339 //! \todo check if RESOURCE MANAGER is availiable 340 //! \todo Textures from .mtl-file need special care. 341 this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE); 338 342 } 339 343
Note: See TracChangeset
for help on using the changeset viewer.