Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6653 in orxonox.OLD


Ignore:
Timestamp:
Jan 22, 2006, 4:38:59 PM (18 years ago)
Author:
bensch
Message:

optimize

Location:
trunk/src/lib/particles
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/particles/dot_particles.cc

    r6652 r6653  
    2828
    2929
    30 CREATE_FACTORY(DotParticles, CL_SPRITE_PARTICLES);
     30CREATE_FACTORY(DotParticles, CL_DOT_PARTICLES);
    3131
    3232SHELL_COMMAND(texture, DotParticles, setMaterialTexture)
     
    6161*/
    6262DotParticles::~DotParticles()
    63 {
    64   // deleting all the living Particles
    65   while (this->particles)
    66   {
    67     Particle* tmpDelPart = this->particles;
    68     this->particles = this->particles->next;
    69     delete tmpDelPart;
    70   }
    71 
    72   // deleting all the dead particles
    73   while (this->deadList)
    74   {
    75     Particle* tmpDelPart = this->deadList;
    76     this->deadList = this->deadList->next;
    77     delete tmpDelPart;
    78   }
    79 }
     63{ }
    8064
    8165/**
     
    8468void DotParticles::init()
    8569{
    86   this->setClassID(CL_SPRITE_PARTICLES, "DotParticles");
     70  this->setClassID(CL_DOT_PARTICLES, "DotParticles");
    8771
    8872  this->material.setDiffuseMap("maps/radial-trans-noise.png");
     
    10286
    10387/**
    104  * @brief sets the Texutre that is placed onto the particles
    105  * @param textureFile the Texture to load onto these DotParticles
    106  */
    107 void DotParticles::setMaterialTexture(const char* textureFile)
    108 {
    109   this->material.setDiffuseMap(textureFile);
    110 }
    111 
    112 /**
    11388 * @brief draws all the Particles of this System
    11489 *
     
    12196  glPushAttrib(GL_ENABLE_BIT);
    12297
    123 
    12498  GLboolean checkLight = false;
    12599  glGetBooleanv(GL_LIGHTING, &checkLight);
    126 //  if (checkLight == GL_TRUE)
    127 //    glDisable(GL_LIGHTING);
     100  if (checkLight == GL_TRUE)
     101    glDisable(GL_LIGHTING);
     102
    128103  glMatrixMode(GL_MODELVIEW);
    129   glDepthMask(GL_FALSE);
    130 
    131   material.select();
    132104  glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
    133105
     
    144116  }
    145117  glEnd();
    146   glDepthMask(GL_TRUE);
    147118  glPopAttrib();
    148119}
  • trunk/src/lib/particles/model_particles.cc

    r6629 r6653  
    6161*/
    6262ModelParticles::~ModelParticles()
    63 {
    64   // deleting all the living Particles
    65   while (this->particles)
    66   {
    67     Particle* tmpDelPart = this->particles;
    68     this->particles = this->particles->next;
    69     delete tmpDelPart;
    70   }
    71 
    72   // deleting all the dead particles
    73   while (this->deadList)
    74   {
    75     Particle* tmpDelPart = this->deadList;
    76     this->deadList = this->deadList->next;
    77     delete tmpDelPart;
    78   }
    79 }
     63{ }
    8064
    8165/**
  • trunk/src/lib/particles/spark_particles.cc

    r6629 r6653  
    6060*/
    6161SparkParticles::~SparkParticles()
    62 {
    63   // deleting all the living Particles
    64   while (this->particles)
    65   {
    66     Particle* tmpDelPart = this->particles;
    67     this->particles = this->particles->next;
    68     delete tmpDelPart;
    69   }
    70 
    71   // deleting all the dead particles
    72   while (this->deadList)
    73   {
    74     Particle* tmpDelPart = this->deadList;
    75     this->deadList = this->deadList->next;
    76     delete tmpDelPart;
    77   }
    78 }
     62{ }
    7963
    8064/**
  • trunk/src/lib/particles/sprite_particles.cc

    r6651 r6653  
    6161*/
    6262SpriteParticles::~SpriteParticles()
    63 {
    64   // deleting all the living Particles
    65   while (this->particles)
    66   {
    67     Particle* tmpDelPart = this->particles;
    68     this->particles = this->particles->next;
    69     delete tmpDelPart;
    70   }
    71 
    72   // deleting all the dead particles
    73   while (this->deadList)
    74   {
    75     Particle* tmpDelPart = this->deadList;
    76     this->deadList = this->deadList->next;
    77     delete tmpDelPart;
    78   }
    79 }
     63{ }
    8064
    8165/**
Note: See TracChangeset for help on using the changeset viewer.