Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 5, 2005, 5:50:07 PM (21 years ago)
Author:
bensch
Message:

orxonox/branches/parenting: importer: modularity improvement. Now Textures handle the texture-ID themselves and can be retrieved with the getTexture()-function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/importer/material.cc

    r3340 r3344  
    5050  if (this->name)
    5151    delete []this->name;
    52   if (this->diffuseTextureSet)
    53     glDeleteTextures (1, &this->diffuseTexture);
     52  if (this->diffuseTexture)
     53    this->diffuseTexture;
    5454  if (this->nextMat)
    5555    delete this->nextMat;
     
    8989  this->setTransparency(0.0);
    9090
     91
     92  this->diffuseTexture = NULL;
     93  this->ambientTexture = NULL;
     94  this->specularTexture = NULL;
    9195
    9296  this->diffuseTextureSet = false;
     
    145149
    146150  if (this->diffuseTextureSet)
    147     glBindTexture(GL_TEXTURE_2D, this->diffuseTexture);
     151    glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
    148152  else
    149153    glBindTexture(GL_TEXTURE_2D, 0);
     
    318322{
    319323  PRINTF(3)("setting Diffuse Map %s\n", dMap);
    320   Texture* tmp = new Texture();
    321   this->diffuseTextureSet = tmp->loadImage(dMap, &this->diffuseTexture);
     324  diffuseTexture = new Texture();
     325  this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
    322326
    323327}
Note: See TracChangeset for help on using the changeset viewer.