Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7751 in orxonox.OLD for trunk/src/world_entities/elements


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

orxonox/trunk: all Textures are shown again.

Location:
trunk/src/world_entities/elements
Files:
2 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);
  • trunk/src/world_entities/elements/image_entity.h

    r7730 r7751  
    1010#include "element_2d.h"
    1111#include "event_listener.h"
    12 #include "material.h"
     12
     13#include "vector.h"
     14
     15
     16// FORWARD DECLARATION
     17class Model;
     18class Material;
     19class TiXmlElement;
    1320
    1421//! A class that enables the
     
    3239
    3340 private:
    34    Material         material;             //!< a material for the Aim.
     41   Material*        material;             //!< a material for the Aim.
    3542   float            rotationSpeed;        //!< Speed of the Rotation.
    3643   bool             bBillboarding;        //!< true if billboarding is on
Note: See TracChangeset for help on using the changeset viewer.