Changeset 7730 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- May 19, 2006, 3:46:41 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
r7221 r7730 49 49 ImageEntity::~ImageEntity () 50 50 { 51 if (this->material)52 delete this->material;53 51 } 54 55 52 56 53 /** … … 67 64 68 65 this->setBindNode(this); 69 this->material = new Material; 70 this->setTexture("pictures/error_texture.png"); 66 //this->setTexture("pictures/error_texture.png"); 71 67 this->bBillboarding = false; 72 68 } … … 78 74 Element2D::loadParams(root); 79 75 80 LoadParam(root, "texture", this, ImageEntity, setTexture)81 .describe("the texture-file to load onto the ImageEntity");76 // LoadParam(root, "texture", this, ImageEntity, setTexture) 77 // .describe("the texture-file to load onto the ImageEntity"); 82 78 83 79 LoadParam(root, "size", this, ImageEntity, setSize) … … 108 104 void ImageEntity::setTexture(const std::string& textureFile) 109 105 { 110 this->material->setDiffuseMap(textureFile);106 // this->material.setDiffuseMap(textureFile); 111 107 } 112 108 … … 144 140 145 141 //glRotatef(this->getAbsDir2D(), 0,0,1); 146 this->material ->select();142 this->material.select(); 147 143 glBegin(GL_TRIANGLE_STRIP); 148 144 glTexCoord2f(0, 0); -
trunk/src/world_entities/elements/image_entity.h
r7221 r7730 10 10 #include "element_2d.h" 11 11 #include "event_listener.h" 12 13 #include "vector.h" 14 15 16 // FORWARD DECLARATION 17 class Model; 18 class Material; 19 class TiXmlElement; 12 #include "material.h" 20 13 21 14 //! A class that enables the … … 39 32 40 33 private: 41 Material *material; //!< a material for the Aim.34 Material material; //!< a material for the Aim. 42 35 float rotationSpeed; //!< Speed of the Rotation. 43 36 bool bBillboarding; //!< true if billboarding is on
Note: See TracChangeset
for help on using the changeset viewer.