Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 22, 2006, 3:40:06 PM (18 years ago)
Author:
bensch
Message:

some implementations of the new self sustained Resources. It works, but does not yet load the correct stuff

File:
1 edited

Legend:

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

    r9718 r9785  
    2525#include "loading/load_param.h"
    2626
    27 #include "util/loading/resource_manager.h"
     27#include "resource_texture.h"
     28//#include "util/loading/resource_manager.h"
    2829
    2930ObjectListDefinition(Material);
     
    9192{
    9293  PRINTF(5)("delete Material %s.\n", this->getCName());
    93 
    94   if (this->ambientTexture != NULL)
    95     ResourceManager::getInstance()->unload(this->ambientTexture);
    96   if (this->specularTexture != NULL)
    97     ResourceManager::getInstance()->unload(this->specularTexture);
    9894
    9995  if (this == Material::selectedMaterial)
     
    297293void Material::addTexturePath(const std::string& pathName)
    298294{
    299   ResourceManager::getInstance()->addImageDir(pathName);
     295  printf("HUPS\n");
     296  //ResourceManager::getInstance()->addImageDir(pathName);
    300297}
    301298
     
    351348  if (!dMap.empty())
    352349  {
    353     Texture* tex = dynamic_cast<Texture*>(ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target));
    354     if (tex != NULL)
    355       this->textures[textureNumber] = *tex;
     350    this->textures[textureNumber] = ResourceTexture(dMap);
     351        //dynamic_cast<Texture*>(ResourceManager::getInstance()->load(dMap, IMAGE, RP_GAME, (int)target));
     352/*    if (tex != NULL)
     353      this->textures[textureNumber] = tex;
    356354    else
    357       this->textures[textureNumber] = Texture();
     355      this->textures[textureNumber] = Texture();*/
    358356  }
    359357  else
Note: See TracChangeset for help on using the changeset viewer.