particle systems
[carveJwlIkooP6JGAAIwe30JlM.git] / particle.h
1 #ifndef PARTICLE_H
2 #define PARTICLE_H
3
4 typedef struct particle_system particle_system;
5 typedef struct particle particle;
6 typedef struct particle_vert particle_vert;
7
8 struct particle_system {
9 struct particle {
10 v3f co, v;
11 f32 life;
12 u32 colour;
13 }
14 *array;
15
16 #pragma pack(push,1)
17 struct particle_vert {
18 v3f co;
19 u32 colour;
20 }
21 *vertices;
22 #pragma pack(pop)
23
24 u32 alive, max;
25 GLuint vao, vbo, ebo;
26 }
27 static particles_grind;
28
29 static void particle_spawn( particle_system *sys,
30 v3f co, v3f v, f32 lifetime, u32 colour );
31 static void particle_init( particle_system *sys, u32 max );
32
33 #include "shaders/particle.h"
34
35 #endif /* PARTICLE_H */