ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/view.h
(Generate patch)

Comparing libgender/view.h (file contents):
Revision 1.3 by root, Mon Oct 4 02:06:57 2004 UTC vs.
Revision 1.4 by root, Mon Oct 4 07:04:58 2004 UTC

1#ifndef VIEW_H 1#ifndef VIEW_H
2#define VIEW_H 2#define VIEW_H
3 3
4#include <set> 4#include <set>
5#include <map>
5 6
6using namespace std; 7using namespace std;
7 8
8#include "util.h" 9#include "util.h"
9 10
15 int w, h; 16 int w, h;
16 17
17 void draw (draw_context &ctx); 18 void draw (draw_context &ctx);
18}; 19};
19 20
21struct visibility_state {
22 unsigned int generation;
23 enum { OCCLUDED, VISIBLE } visibility;
24
25 visibility_state () : generation(0), visibility(OCCLUDED) { };
26};
27
20struct draw_context { 28struct draw_context {
21 gl_matrix projection; 29 gl_matrix projection;
22 view &v; 30 view &v;
23 enum { DEPTH, LIGHTED } mode; 31 enum { DEPTH, LIGHTED } mode;
24 light *l; 32 light *l;
25 set<entity_base *> drawn; 33 set<entity_base *> drawn;
34
35 unsigned int generation;
36 map<octant *, visibility_state> vismap;
26 37
27 bool may_draw (entity_base *e); 38 bool may_draw (entity_base *e);
28 39
29 draw_context (view &v); 40 draw_context (view &v);
30 ~draw_context (); 41 ~draw_context ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines