Changeset 6812 in orxonox.OLD for trunk/src/lib/graphics/importer
- Timestamp:
- Jan 28, 2006, 4:43:57 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r6799 r6812 108 108 109 109 // setting the transparency 110 if (this->transparency < 1.0 )111 {112 glEnable(GL_BLEND);113 glBlendFunc(GL_SRC_ALPHA, GL_ONE);114 //glColor4f(*(this->diffuse), *(this->diffuse+1), *(this->diffuse+2), this->transparency);115 110 if (this->transparency < 1.0 || /* This allows alpha blending of 2D textures with the scene */ 111 (this->diffuseTexture && this->diffuseTexture->hasAlpha())) 112 { 113 glEnable(GL_BLEND); 114 glBlendFunc(GL_SRC_ALPHA, GL_ONE/*_MINUS_SRC_ALPHA*/); 115 } 116 116 else 117 117 { … … 131 131 glEnable(GL_TEXTURE_2D); 132 132 glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture()); 133 134 /* This allows alpha blending of 2D textures with the scene */135 if (this->diffuseTexture->hasAlpha())136 {137 glEnable(GL_BLEND);138 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);139 }140 133 } 141 134 else
Note: See TracChangeset
for help on using the changeset viewer.