Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 27, 2005, 7:44:39 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: resource manager working, player uses it.

File:
1 edited

Legend:

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

    r3655 r3658  
    2121#include "texture.h"
    2222#include "debug.h"
     23#include "resource_manager.h"
    2324#include <stdlib.h>
    2425#include <string.h>
     
    6162    delete []this->name;
    6263  if (this->diffuseTexture)
    63     this->diffuseTexture;
     64    ResourceManager::unload(this->diffuseTexture);
    6465  if (this->nextMat)
    6566    delete this->nextMat;
     
    9293  this->nextMat = NULL;
    9394  this->name ="";
    94   this->setIllum(1);
     95  this->setIllum(3);
    9596  this->setDiffuse(0,0,0);
    9697  this->setAmbient(0,0,0);
     
    168169}
    169170
    170 
    171171/**
    172172   \brief Set the Name of the Material. (Important for searching)
     
    322322void Material::addTexturePath(char* pathName)
    323323{
    324   PathList::getInstance()->addPath(pathName);
     324  ResourceManager::getInstance()->addImageDir(pathName);
    325325}
    326326
     
    334334{
    335335  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);
    338338
    339339  //! \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);
    341342}
    342343
Note: See TracChangeset for help on using the changeset viewer.