… | |
… | |
39 | vec3 d, u; |
39 | vec3 d, u; |
40 | GLfloat fov; |
40 | GLfloat fov; |
41 | GLfloat z_near, z_far, c_far; |
41 | GLfloat z_near, z_far, c_far; |
42 | int w, h; |
42 | int w, h; |
43 | GLfloat pixfact; // how many pixels on screen are drawn by a unit length line, *roughly* |
43 | GLfloat pixfact; // how many pixels on screen are drawn by a unit length line, *roughly* |
|
|
44 | sector eorig; // orig of currently-rendered entity in relation to the camera |
44 | |
45 | |
45 | GLfloat gamma; |
46 | GLfloat gamma; |
46 | |
47 | |
47 | // only to be used by friends: TODO |
48 | // only to be used by friends: TODO |
48 | |
49 | |
49 | GLfloat nz_far, nc_far; |
50 | GLfloat nz_far, nz_near, nc_far; |
50 | GLfloat diagfact; // bounding box border to depth factor |
51 | GLfloat diagfact; // bounding box border to depth factor |
51 | GLfloat perspfact; // perspfact * (1/depth)=> pixels |
52 | GLfloat perspfact; // perspfact * (1/depth)=> pixels |
52 | |
53 | |
53 | gl::matrix projection; |
54 | gl::matrix projection; |
54 | |
55 | |
55 | struct { |
56 | struct { |
56 | plane l, r, t, b, n, f; |
57 | plane l, r, t, b, n, f; |
|
|
58 | cone c; |
|
|
59 | sphere s; |
57 | } frustum; |
60 | } frustum; |
58 | |
61 | |
59 | // the passes |
62 | // the passes |
60 | enum pass { |
63 | enum pass { |
61 | DEPTH, // mandatory, render depth only |
64 | DEPTH, // mandatory, render depth only |
62 | POSTDEPTH, // mandatory, occ tests or ignored |
65 | POSTDEPTH, // mandatory, occ tests or ignored |
63 | LIGHTED, // optional, render faces in full glory |
66 | LIGHTED, // optional, render faces in full glory |
64 | } pass; |
67 | } pass; |
65 | |
68 | |
66 | struct light *l; |
|
|
67 | set<const entity *> drawn; // TODO: put drawn info and octant+entity visibility info into vismap! |
69 | set<const entity *> drawn; // TODO: put drawn info and octant+entity visibility info into vismap! |
68 | |
70 | |
69 | unsigned int generation; |
71 | unsigned int generation; |
70 | typedef map<visible *, visibility_base *> visibility_map; |
72 | typedef map<visible *, visibility_base *> visibility_map; |
71 | visibility_map vismap; |
73 | visibility_map vismap; |