Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 18, 2006, 5:05:45 PM (18 years ago)
Author:
stefalie
Message:

branches/water: first attempt to realise reflection

File:
1 edited

Legend:

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

    r7687 r7700  
    333333// MAPPING //
    334334
    335 /**
    336  *  Sets the Materials Diffuse Map
     335void Material::setDiffuseMap(Texture* texture, unsigned int textureNumber)
     336{
     337  assert(textureNumber < Material::getMaxTextureUnits());
     338
     339  if (this->textures.size() > textureNumber && this->textures[textureNumber] != NULL)
     340    ResourceManager::getInstance()->unload(this->textures[textureNumber]);
     341
     342  if (this->textures.size() <= textureNumber)
     343    this->textures.resize(textureNumber+1, NULL);
     344
     345  //! @todo check if RESOURCE MANAGER is availiable
     346  this->textures[textureNumber] = texture;
     347}
     348
     349
     350/**
     351 * @brief Sets the Materials Diffuse Map
    337352 * @param dMap the Name of the Image to Use
    338353*/
Note: See TracChangeset for help on using the changeset viewer.