Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7730 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
May 19, 2006, 3:46:41 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: testing if it works on WIndows like this

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/texture.cc

    r7727 r7730  
    272272  glBindTexture(target, texture);
    273273
    274 //   glTexImage2D(target,  0,  format,
    275 //                surface->w,  surface->h,
    276 //                0, format,  GL_UNSIGNED_BYTE,
    277 //                surface->pixels);
     274   glTexImage2D(target,  0,  format,
     275                surface->w,  surface->h,
     276                0, format,  GL_UNSIGNED_BYTE,
     277                surface->pixels);
    278278
    279279  glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_REPEAT);
  • trunk/src/world_entities/elements/image_entity.cc

    r7221 r7730  
    4949ImageEntity::~ImageEntity ()
    5050{
    51   if (this->material)
    52     delete this->material;
    5351}
    54 
    5552
    5653/**
     
    6764
    6865  this->setBindNode(this);
    69   this->material = new Material;
    70   this->setTexture("pictures/error_texture.png");
     66  //this->setTexture("pictures/error_texture.png");
    7167  this->bBillboarding = false;
    7268}
     
    7874  Element2D::loadParams(root);
    7975
    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");
    8278
    8379  LoadParam(root, "size", this, ImageEntity, setSize)
     
    108104void ImageEntity::setTexture(const std::string& textureFile)
    109105{
    110   this->material->setDiffuseMap(textureFile);
     106 //   this->material.setDiffuseMap(textureFile);
    111107}
    112108
     
    144140
    145141  //glRotatef(this->getAbsDir2D(), 0,0,1);
    146   this->material->select();
     142  this->material.select();
    147143  glBegin(GL_TRIANGLE_STRIP);
    148144  glTexCoord2f(0, 0);
  • trunk/src/world_entities/elements/image_entity.h

    r7221 r7730  
    1010#include "element_2d.h"
    1111#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"
    2013
    2114//! A class that enables the
     
    3932
    4033 private:
    41    Material*        material;             //!< a material for the Aim.
     34   Material         material;             //!< a material for the Aim.
    4235   float            rotationSpeed;        //!< Speed of the Rotation.
    4336   bool             bBillboarding;        //!< true if billboarding is on
Note: See TracChangeset for help on using the changeset viewer.