Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 7, 2005, 3:54:49 PM (19 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Merged trunk into branch… still not working though…

File:
1 edited

Legend:

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

    r3605 r3746  
    2121#include "texture.h"
    2222#include "debug.h"
     23#include "resource_manager.h"
    2324#include <stdlib.h>
    2425#include <string.h>
     26
     27//! \todo check if we are in RESOURCE MANAGER-mode
     28#include "resource_manager.h"
    2529
    2630using namespace std;
     
    5862    delete []this->name;
    5963  if (this->diffuseTexture)
    60     this->diffuseTexture;
     64    ResourceManager::getInstance()->unload(this->diffuseTexture);
    6165  if (this->nextMat)
    6266    delete this->nextMat;
     
    8993  this->nextMat = NULL;
    9094  this->name ="";
    91   this->setIllum(1);
     95  this->setIllum(3);
    9296  this->setDiffuse(0,0,0);
    9397  this->setAmbient(0,0,0);
     
    104108  this->ambientTextureSet = false;
    105109  this->specularTextureSet = false;
    106 
    107  
    108110}
    109111
     
    167169}
    168170
    169 
    170171/**
    171172   \brief Set the Name of the Material. (Important for searching)
     
    321322void Material::addTexturePath(char* pathName)
    322323{
    323   PathList::getInstance()->addPath(pathName);
     324  ResourceManager::getInstance()->addImageDir(pathName);
    324325}
    325326
     
    333334{
    334335  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);
    338342}
    339343
Note: See TracChangeset for help on using the changeset viewer.