Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 21, 2006, 12:51:36 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: all Textures are shown again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/elements/image_entity.cc

    r7730 r7751  
    4949ImageEntity::~ImageEntity ()
    5050{
     51  if (this->material)
     52    delete this->material;
    5153}
     54
    5255
    5356/**
     
    6467
    6568  this->setBindNode(this);
    66   //this->setTexture("pictures/error_texture.png");
     69  this->material = new Material;
     70  this->setTexture("pictures/error_texture.png");
    6771  this->bBillboarding = false;
    6872}
     
    7478  Element2D::loadParams(root);
    7579
    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");
    7882
    7983  LoadParam(root, "size", this, ImageEntity, setSize)
     
    104108void ImageEntity::setTexture(const std::string& textureFile)
    105109{
    106  //   this->material.setDiffuseMap(textureFile);
     110  this->material->setDiffuseMap(textureFile);
    107111}
    108112
     
    140144
    141145  //glRotatef(this->getAbsDir2D(), 0,0,1);
    142   this->material.select();
     146  this->material->select();
    143147  glBegin(GL_TRIANGLE_STRIP);
    144148  glTexCoord2f(0, 0);
Note: See TracChangeset for help on using the changeset viewer.