- attempt to lessen memory footprint of particles and speed up rendering

This commit is contained in:
Mark Vejvoda
2010-08-24 01:21:34 +00:00
parent 1daecc4145
commit 65cf1bfdac
10 changed files with 180 additions and 74 deletions

View File

@@ -40,7 +40,7 @@ class Model;
// class Particle
// =====================================================
class Particle{
class Particle {
public:
//attributes
Vec3f pos;
@@ -52,6 +52,10 @@ public:
int energy;
public:
Particle() {
size = 0;
energy = 0;
}
//get
Vec3f getPos() const {return pos;}
Vec3f getLastPos() const {return lastPos;}
@@ -94,7 +98,7 @@ protected:
protected:
Particle *particles;
std::vector<Particle> particles;
RandomGen random;
BlendMode blendMode;
@@ -102,7 +106,7 @@ protected:
bool active;
bool visible;
int aliveParticleCount;
int particleCount;
//int particleCount;
Texture *texture;