map binary data
[carveJwlIkooP6JGAAIwe30JlM.git] / trail.h
1 #pragma once
2
3 typedef struct trail_system trail_system;
4 typedef struct trail_point trail_point;
5 typedef struct trail_vert trail_vert;
6
7 struct trail_system {
8 struct trail_point {
9 v3f co, normal, right;
10 f32 alpha;
11 }
12 *array;
13
14 #pragma pack(push,1)
15 struct trail_vert {
16 v4f co; /* xyz: position, w: alpha */
17 }
18 *vertices;
19 #pragma pack(pop)
20
21 i32 head, count, max;
22 GLuint vao, vbo;
23
24 /* render settings */
25 f32 width, lifetime, min_dist;
26 };
27
28 void trail_alloc( trail_system *sys, u32 max );
29 void trail_system_update( trail_system *sys, f32 dt, v3f co,
30 v3f normal, f32 alpha );
31 void trail_system_debug( trail_system *sys );
32 void trail_system_prerender( trail_system *sys );
33 void trail_system_render( trail_system *sys, vg_camera *cam );