Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5303 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Oct 7, 2005, 2:42:30 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: less output on quit… still some strange effecs caused by unloading textures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/material.cc

    r5302 r5303  
    3636Material::Material (const char* mtlName)
    3737{
    38   PRINTF(4)("initializing new Material.\n");
     38  this->setClassID(CL_MATERIAL, "Material");
     39
    3940  this->setIllum(3);
    4041  this->setDiffuse(0,0,0);
     
    5859  PRINTF(4)("delete Material %s.\n", this->getName());
    5960
    60   if (this->diffuseTexture)
     61  if (this->diffuseTexture != NULL)
    6162    ResourceManager::getInstance()->unload(this->diffuseTexture);
    62   if (this->ambientTexture)
     63  if (this->ambientTexture != NULL)
    6364    ResourceManager::getInstance()->unload(this->ambientTexture);
    64   if (this->specularTexture)
     65  if (this->specularTexture != NULL)
    6566    ResourceManager::getInstance()->unload(this->specularTexture);
    6667}
     
    275276  //! @todo Textures from .mtl-file need special care.
    276277  if (dMap!= NULL)
    277     this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);
     278    this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME);
    278279  else
    279280    this->diffuseTexture = NULL;
Note: See TracChangeset for help on using the changeset viewer.