Changeset 4111 in orxonox.OLD for orxonox/branches/heightMap/src/lib/graphics/importer/material.cc
- Timestamp:
- May 7, 2005, 5:22:44 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/heightMap/src/lib/graphics/importer/material.cc
r3914 r4111 88 88 89 89 // setting the transparency 90 if (this->transparency == 1.0) 91 { 92 glDisable(GL_BLEND); 93 } 94 else 90 if (this->transparency < 1.0) 95 91 { 96 92 glEnable(GL_BLEND); … … 98 94 glBlendFunc(GL_SRC_ALPHA, GL_ONE); 99 95 } 96 else 97 { 98 glDisable(GL_BLEND); 99 glColor4f(1.0f, 1.0f, 1.0f, 1.0f); 100 } 101 100 102 101 103 // setting illumination Model … … 109 111 glEnable(GL_TEXTURE_2D); 110 112 glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture()); 113 114 /* This allows alpha blending of 2D textures with the scene */ 115 if (this->diffuseTexture->hasAlpha()) 116 { 117 glEnable(GL_BLEND); 118 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 119 } 111 120 } 112 121 else
Note: See TracChangeset
for help on using the changeset viewer.