Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
GodVenn committed Jan 20, 2021
2 parents 65b8461 + 4cffa13 commit 0af7500
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Engine/Headers/ParticleSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
#include "Camera.h"
#include "Texture.h"

#define POOL_SIZE 5000
#define POOL_SIZE 35000
#define OFFSET_ARRAY 7

namespace engine
{
struct Particle
{
Vec3 Position = Vec3(0.0f, 2.0f, 0.0f);
Vec3 Position = Vec3(0.0f, 5.0f, 0.0f);
Vec3 Velocity = Vec3(0.0f);
Vec4 Color = { 1.0f, 1.0f, 1.0f, 1.0f };
float Rotation = 0.0f;
float Size = 0.5f;

float LifeTime = 15.0f;
float LifeTime = 30.0f;
float LifeRemaining = 0.0f;

bool Active = false;
Expand All @@ -45,7 +45,7 @@ namespace engine
unsigned int VBO, VAO;
ShaderProgram* ParticleShader;

float circleSize = 6.0f;
float circleSize = 20.0f;
Vec3 cameraMovement;
};
}
2 changes: 1 addition & 1 deletion Engine/Source/MyApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class MyApp : public IApp, IUpdatable

//Particles
Particle default_Particle;
int particlesToSpawn = 5;
int particlesToSpawn = 50;
float maxTime = 0.0001f; //Particle respawn time
float timer = maxTime;

Expand Down
4 changes: 2 additions & 2 deletions Engine/Source/ParticleSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ namespace engine {

Particle_Pool_Index = ++Particle_Pool_Index % (POOL_SIZE);

//if(Particle_Pool_Index % 100 == 0)
//std::cout << "index: " << Particle_Pool_Index << std::endl;
if(Particle_Pool_Index % 1000 == 0)
std::cout << "index: " << Particle_Pool_Index << std::endl;
}

void ParticleSystem::SetCameraMovement(const Vec3& movement)
Expand Down

0 comments on commit 0af7500

Please sign in to comment.