Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7883 in orxonox.OLD for branches/gui/src/lib/graphics/importer


Ignore:
Timestamp:
May 27, 2006, 1:57:33 AM (19 years ago)
Author:
bensch
Message:

gui: click and release work (internally)

File:
1 edited

Legend:

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

    r7848 r7883  
    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.