Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8761 in orxonox.OLD for trunk/src/lib/graphics/importer/material.cc


Ignore:
Timestamp:
Jun 24, 2006, 2:16:12 AM (18 years ago)
Author:
bensch
Message:

merged the new Font-Implementation back here
merged with svn merge https://svn.orxonox.net/orxonox/branches/fontdata . -r8752:HEAD
no conflicts, naturally

File:
1 edited

Legend:

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

    r8619 r8761  
    317317}
    318318
     319/**
     320 * @brief Sets the Diffuse map of this Texture by a Texture-pointer.
     321 * @param textureDataPointer The Texture-Data-Pointer to load.
     322 * @param textureNumber The Texture-Number from 0 to GL_MAX_TEXTURE_UNITS
     323 */
     324void Material::setDiffuseMap(const TextureDataPointer& textureDataPointer, unsigned int textureNumber)
     325{
     326  assert(textureNumber < Material::getMaxTextureUnits());
     327
     328  if (this->textures.size() <= textureNumber)
     329    this->textures.resize(textureNumber+1, Texture());
     330
     331  this->textures[textureNumber] = textureDataPointer;
     332}
     333
    319334
    320335/**
     
    436451}
    437452
     453
     454
     455void Material::debug() const
     456{
     457  PRINT(0)("Debug Material: %s\n", this->getName());
     458  PRINT(0)("illumModel: %d ; ShiniNess %f\n", this->illumModel, shininess);
     459  PRINT(0)("diffuseColor: "); diffuse.debug();
     460  PRINT(0)("ambientColor: "); ambient.debug();
     461  PRINT(0)("diffuseColor: "); specular.debug();
     462  PRINT(0)("Blending Properties: Source: %s, Destination: %s\n", blendFuncToString(sFactor).c_str(), blendFuncToString(tFactor).c_str());
     463
     464  PRINT(0)("Textures: %d loaded", textures.size());
     465  if (!this->textures.empty())
     466  {
     467    PRINT(0)(" - ID's: ");
     468    for (unsigned int i = 0; i < textures.size(); ++i)
     469    {
     470      PRINT(0)("%d ", textures[i].getTexture());
     471    }
     472  }
     473  PRINT(0)("\n");
     474}
     475
     476
    438477const GLenum Material::glTextureArbs[] =
    439478{
Note: See TracChangeset for help on using the changeset viewer.