Changeset 3344 in orxonox.OLD for orxonox/branches/parenting/src/importer/material.cc
- Timestamp:
- Jan 5, 2005, 5:50:07 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/importer/material.cc
r3340 r3344 50 50 if (this->name) 51 51 delete []this->name; 52 if (this->diffuseTexture Set)53 glDeleteTextures (1, &this->diffuseTexture);52 if (this->diffuseTexture) 53 this->diffuseTexture; 54 54 if (this->nextMat) 55 55 delete this->nextMat; … … 89 89 this->setTransparency(0.0); 90 90 91 92 this->diffuseTexture = NULL; 93 this->ambientTexture = NULL; 94 this->specularTexture = NULL; 91 95 92 96 this->diffuseTextureSet = false; … … 145 149 146 150 if (this->diffuseTextureSet) 147 glBindTexture(GL_TEXTURE_2D, this->diffuseTexture );151 glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture()); 148 152 else 149 153 glBindTexture(GL_TEXTURE_2D, 0); … … 318 322 { 319 323 PRINTF(3)("setting Diffuse Map %s\n", dMap); 320 Texture* tmp= new Texture();321 this->diffuseTextureSet = tmp->loadImage(dMap, &this->diffuseTexture);324 diffuseTexture = new Texture(); 325 this->diffuseTextureSet = diffuseTexture->loadImage(dMap); 322 326 323 327 }
Note: See TracChangeset
for help on using the changeset viewer.