Changeset 7751 in orxonox.OLD for trunk/src/world_entities/elements/image_entity.cc
- Timestamp:
- May 21, 2006, 12:51:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/elements/image_entity.cc
r7730 r7751 49 49 ImageEntity::~ImageEntity () 50 50 { 51 if (this->material) 52 delete this->material; 51 53 } 54 52 55 53 56 /** … … 64 67 65 68 this->setBindNode(this); 66 //this->setTexture("pictures/error_texture.png"); 69 this->material = new Material; 70 this->setTexture("pictures/error_texture.png"); 67 71 this->bBillboarding = false; 68 72 } … … 74 78 Element2D::loadParams(root); 75 79 76 //LoadParam(root, "texture", this, ImageEntity, setTexture)77 //.describe("the texture-file to load onto the ImageEntity");80 LoadParam(root, "texture", this, ImageEntity, setTexture) 81 .describe("the texture-file to load onto the ImageEntity"); 78 82 79 83 LoadParam(root, "size", this, ImageEntity, setSize) … … 104 108 void ImageEntity::setTexture(const std::string& textureFile) 105 109 { 106 // this->material.setDiffuseMap(textureFile);110 this->material->setDiffuseMap(textureFile); 107 111 } 108 112 … … 140 144 141 145 //glRotatef(this->getAbsDir2D(), 0,0,1); 142 this->material .select();146 this->material->select(); 143 147 glBegin(GL_TRIANGLE_STRIP); 144 148 glTexCoord2f(0, 0);
Note: See TracChangeset
for help on using the changeset viewer.