view3d
view src/scene.h @ 1:7650e941805c
forgot two files
author | John Tsiombikas <nuclear@mutantstargoat.com> |
---|---|
date | Thu, 19 Jan 2012 00:17:49 +0200 |
parents | |
children | 7e982a61852a |
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 struct light *next;
31 };
33 struct scene {
34 struct mesh *meshes;
35 struct light *lights;
37 struct aabb bbox;
38 };
41 int load_scene(struct scene *scn, const char *fname);
43 void render_scene(struct scene *scn);
44 void render_mesh(struct mesh *m);
46 #endif /* SCENE_H_ */