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

Comparing libgender/view.h (file contents):
Revision 1.31 by root, Tue Nov 2 23:26:46 2004 UTC vs.
Revision 1.32 by root, Wed Nov 3 03:35:13 2004 UTC

7 7
8using namespace std; 8using namespace std;
9 9
10#include "util.h" 10#include "util.h"
11#include "event.h" 11#include "event.h"
12#include "shader.h"
12 13
13struct visibility_base 14struct visibility_base
14{ 15{
15 unsigned int generation; // freshness check 16 unsigned int generation; // freshness check
16}; 17};
34 35
35struct pass 36struct pass
36{ 37{
37 struct light *l; 38 struct light *l;
38 39
40 typedef map<struct material *, shader::program_object> matmap_t;
41 matmap_t matmap;
42
39 pass (light *l) : l(l) { } 43 pass (light *l) : l(l) { }
40}; 44};
41 45
42extern pass pass_depth; 46extern pass pass_depth; // the standard depth pass
43 47
44struct view 48struct view
45{ 49{
46 sector orig; 50 sector orig;
47 point p; 51 point p;
110 ~view (); 114 ~view ();
111}; 115};
112 116
113struct light : view 117struct light : view
114{ 118{
119 shader::uniform_4f lightpos;
120
121 // vertex shader
122 virtual void vsh () = 0;
123 // fragment shader
124 virtual shader::temp_3f operator ()() = 0;
125
126 virtual void enable ();
127 virtual void disable ();
128};
129
130struct linear_light : light
131{
115 colour c; 132 colour c;
116 GLfloat intensity; 133 GLfloat intensity;
117 GLfloat radius; 134 GLfloat radius;
135
136 void vsh ();
137 shader::temp_3f operator ()();
118}; 138};
119 139
120#endif 140#endif
121 141

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines