Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5303 in orxonox.OLD


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

Location:
trunk/src
Files:
3 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;
  • trunk/src/orxonox.cc

    r5298 r5303  
    2121   ### File Specific:
    2222   main-programmer: Patrick Boenzli
    23 co-programmer: Christian Meyer
     23   co-programmer: Christian Meyer
    2424   co-programmer: Benjamin Grauer: injected ResourceManager/GraphicsEngine/GUI
    2525*/
    2626
     27#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ORXONOX
    2728#include "orxonox.h"
    2829
  • trunk/src/util/resource_manager.cc

    r5302 r5303  
    7171  // deleting the Resources-List
    7272  this->unloadAllByPriority(RP_GAME);
     73
     74  if (this->resourceList->getSize() > 0)
     75    PRINTF(1)("Not removed all Textures, since there are still %d resources registered\n", this->resourceList->getSize());
     76
    7377  delete this->resourceList;
    7478  // deleting the Directorie Lists
     
    7781  while(tmpDir)
    7882    {
    79       delete []tmpDir;
     83      delete[] tmpDir;
    8084      tmpDir = tmpIt->nextElement();
    8185    }
Note: See TracChangeset for help on using the changeset viewer.