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

Comparing libgender/view.h (file contents):
Revision 1.32 by root, Wed Nov 3 03:35:13 2004 UTC vs.
Revision 1.33 by root, Sat Nov 6 00:06:33 2004 UTC

114 ~view (); 114 ~view ();
115}; 115};
116 116
117struct light : view 117struct light : view
118{ 118{
119 shader::uniform_4f lightpos; 119 // the following variables are valid in the fragment shader as well as in the vertex shader
120 bool has_lightvec; // is a light vector available?
121 shader::temp_3f sh_lightvec; // not defined unless has_lightvec is true
122 shader::temp_3f sh_colour; // always available for any light
120 123
121 // vertex shader 124 // vertex shader
122 virtual void vsh () = 0; 125 virtual void vsh () = 0;
123 // fragment shader 126 // fragment shader
124 virtual shader::temp_3f operator ()() = 0; 127 virtual void fsh () = 0;
125 128
126 virtual void enable (); 129 virtual void enable ();
127 virtual void disable (); 130 virtual void disable ();
131
132protected:
133 shader::uniform_3f lightpos; // or direction
128}; 134};
129 135
130struct linear_light : light 136struct linear_light : light
131{ 137{
132 colour c; 138 colour c;
133 GLfloat intensity; 139 GLfloat intensity;
134 GLfloat radius; 140 GLfloat radius;
135 141
136 void vsh (); 142 void vsh ();
137 shader::temp_3f operator ()(); 143 void fsh ();
138}; 144};
139 145
140#endif 146#endif
141 147

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines