Changeset 7883 in orxonox.OLD for branches/gui/src/lib/graphics/importer
- Timestamp:
- May 27, 2006, 1:57:33 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/graphics/importer/material.cc
r7848 r7883 108 108 return true; 109 109 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 112 121 glColor4f (diffuse[0], diffuse[1], diffuse[2], this->transparency); 113 122 // setting ambient color … … 118 127 glMaterialf(GL_FRONT, GL_SHININESS, this->shininess); 119 128 120 121 129 // setting the transparency 122 130 if (this->transparency < 1.0 || /* This allows alpha blending of 2D textures with the scene */ … … 138 146 glShadeModel(GL_SMOOTH); 139 147 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 }149 148 150 149 for(unsigned int i = 0; i < this->textures.size(); ++i) … … 159 158 } 160 159 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 else168 {169 glDisable(GL_TEXTURE_2D);170 glBindTexture(GL_TEXTURE_2D, 0);171 }*/172 160 } 173 161
Note: See TracChangeset
for help on using the changeset viewer.