view3d
view src/scene.h @ 4:0aee5df08cfc
fixed some shit
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Thu, 19 Jan 2012 07:03:47 +0200 |
parents | 7650e941805c |
children | 5562a637e5aa |
line source
1 #ifndef SCENE_H_
2 #define SCENE_H_
4 struct aabb {
5 float min[3], max[3];
6 };
8 struct material {
9 float kd[4];
10 float ks[4];
11 float shin;
12 unsigned int tex;
13 };
15 struct mesh {
16 unsigned int vert_buf, norm_buf, tex_buf, idx_buf;
17 int num_verts, num_faces;
19 struct material mat;
21 struct aabb bbox;
23 struct mesh *next;
24 };
26 struct light {
27 float pos[4];
28 float color[4];
30 float cone_inner, cone_outer;
32 float att[3];
34 struct light *next;
35 };
37 struct scene {
38 struct mesh *meshes;
39 struct light *lights;
41 struct aabb bbox;
42 };
45 int load_scene(struct scene *scn, const char *fname);
47 void render_scene(struct scene *scn);
48 void render_mesh(struct mesh *m, int pass);
50 #endif /* SCENE_H_ */