Changeset 7751 in orxonox.OLD for trunk/src/world_entities/elements
- Timestamp:
- May 21, 2006, 12:51:36 PM (19 years ago)
- Location:
- trunk/src/world_entities/elements
- Files:
-
- 2 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); -
trunk/src/world_entities/elements/image_entity.h
r7730 r7751 10 10 #include "element_2d.h" 11 11 #include "event_listener.h" 12 #include "material.h" 12 13 #include "vector.h" 14 15 16 // FORWARD DECLARATION 17 class Model; 18 class Material; 19 class TiXmlElement; 13 20 14 21 //! A class that enables the … … 32 39 33 40 private: 34 Material 41 Material* material; //!< a material for the Aim. 35 42 float rotationSpeed; //!< Speed of the Rotation. 36 43 bool bBillboarding; //!< true if billboarding is on
Note: See TracChangeset
for help on using the changeset viewer.