Architechture - tiagodinis/GParticles GitHub Wiki
GParticles is composed by 3 main components: the data singleton, the systems singleton and the project loader. The project loader simply loads an xml file with the particle systems configurations, processes that information and fills the two singletons with data.

GP_Data is the class responsible for resource management. It has a singleton, that can be referenced using the GPDATA definition through which is possible accessing, updating and adding new resources (buffers, atomics and uniforms). It also provides some other useful data, such as the viewport dimensions or the current time in various time units.

GP_Systems has a singleton (referenced using GPARTICLES) that holds the previously loaded particle systems. It allows some operations on those particle systems, such as the pausing/resuming of their execution and the loading of a project file can also be done through it.

The particle system itself contains its properties, and three shader programs, tasked with the processing of particle data with a specific goal:
- emitter: controls when new particles are instantiated and initializes the values of their required data components;
- updater: alters particle data according with the given instructions. It's also the program that tests for collisions and "knows" when a particle should be killed;
- renderer: specializes in drawing the particle data representation on screen;

The shader programs hold the handle of their program object, name references to the resources they require and some other auxiliary information, such as the last iteration time stamp or the particle system name. And in terms of components this is it.
After the project definition file data has been parsed by the GP_Loader, the GPARTICLES singleton processParticles function can be called. This function will perform an iteration on every particle system, executing their shader programs in sequence. This function can receive model, view and projection matrices as parameters to be passed along to the shaders, and they all default to identity matrices if none is provided.

When its time for the execution of a particle system program object, the corresponding shader program installs it, binds the required resources using the GPDATA singleton and calls the shader executing function.