Skip to content

Particle

bluecri edited this page Sep 29, 2018 · 5 revisions

Particle

Imgur


Particle Entity

  • Particle class has Entity class as parent.

  • Create ParticleEntity with RParticle(shader select)

  • Create ParticleCreateInfo and register to RParticle


RParticle

  • Has shader & list of ParticleCreateInfo

  • Update All ParticleCreateInfo with deltaTime


ParticleCreateInfo

  • Has information for creating particle.

Particle Color, Size

Particle Generation interval (N particle/frame OR 1 particle/N frame)

Particle Life Time

Particle spread angle, direction, speed

Any particle generate logic can be placed in this.


ParticleFObjManager

  • Manage ParticleFObjs

  • If Same texture used, not create new ParticleFObj & return already exist object


ParticleFObj

  • Has vector of ParticleStruct. & ParticleBuffer

  • If same particle textures are used, then has same particleFObj.

  • Generally, multiple particle images are in 1 texture for blending

  • Generate particles in vector and copy info to ParticleBuffer for instancing


ParticleBuffer

  • Opengl buffer(vao, vbo, particle square vertices)

  • Draw particles with instancing

Clone this wiki locally