Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
May 28, 2006, 3:48:13 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the gui branche back
merged with command:
https://svn.orxonox.net/orxonox/branches/gui
no conflicts

File:
1 edited

Legend:

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

    r7848 r7919  
    108108      return true;
    109109
    110 
    111   // setting diffuse color
     110  if (likely(Material::selectedMaterial != NULL))
     111  {
     112    for(unsigned int i = 0; i < Material::selectedMaterial->textures.size(); ++i)
     113    {
     114        glActiveTexture(Material::glTextureArbs[i]);
     115        //glBindTexture(GL_TEXTURE_2D, 0);
     116        glDisable(GL_TEXTURE_2D);
     117    }
     118  }
     119
     120    // setting diffuse color
    112121  glColor4f (diffuse[0], diffuse[1], diffuse[2], this->transparency);
    113122  // setting ambient color
     
    118127  glMaterialf(GL_FRONT, GL_SHININESS, this->shininess);
    119128
    120 
    121129  // setting the transparency
    122130  if (this->transparency < 1.0 ||       /* This allows alpha blending of 2D textures with the scene */
     
    138146    glShadeModel(GL_SMOOTH);
    139147
    140   if (likely(Material::selectedMaterial != NULL))
    141   {
    142     for(unsigned int i = 0; i < Material::selectedMaterial->textures.size(); ++i)
    143     {
    144         glActiveTexture(Material::glTextureArbs[i]);
    145         glBindTexture(GL_TEXTURE_2D, 0);
    146         glDisable(GL_TEXTURE_2D);
    147     }
    148   }
    149148
    150149  for(unsigned int i = 0; i < this->textures.size(); ++i)
     
    159158  }
    160159  Material::selectedMaterial = this;
    161 
    162   /*  if (this->diffuseTexture != NULL)
    163       {
    164         glEnable(GL_TEXTURE_2D);
    165         glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
    166       }
    167     else
    168       {
    169         glDisable(GL_TEXTURE_2D);
    170         glBindTexture(GL_TEXTURE_2D, 0);
    171       }*/
    172160}
    173161
Note: See TracChangeset for help on using the changeset viewer.