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

Comparing libgender/shader.C (file contents):
Revision 1.9 by root, Sun Oct 24 01:36:00 2004 UTC vs.
Revision 1.11 by root, Sun Oct 24 01:55:00 2004 UTC

3 3
4namespace shader { 4namespace shader {
5 5
6 refcounted::~refcounted () 6 refcounted::~refcounted ()
7 { 7 {
8#if 0 8#if 1
9 if (refcnt) 9 if (refcnt)
10 abort (); 10 abort ();
11#endif 11#endif
12 } 12 }
13 13
215 { 215 {
216 string src = source (); 216 string src = source ();
217 const char *sptr = src.data (); 217 const char *sptr = src.data ();
218 const int slen = src.size (); 218 const int slen = src.size ();
219 219
220 printf ("SOURCE<%s>\n", src.c_str ()); 220 printf ("SOURCE<%s>\n", src.c_str ());
221 abort ();
222 glShaderSourceARB (id, 1, &sptr, &slen); 221 glShaderSourceARB (id, 1, &sptr, &slen);
223 glCompileShaderARB (id); 222 glCompileShaderARB (id);
224 223
225 GLint compiled; 224 GLint compiled;
226 glGetObjectParameterivARB (id, GL_OBJECT_COMPILE_STATUS_ARB, &compiled); 225 glGetObjectParameterivARB (id, GL_OBJECT_COMPILE_STATUS_ARB, &compiled);
331 vout.tex_coord[2] = normalize (wpos); 330 vout.tex_coord[2] = normalize (wpos);
332 vout.tex_coord[3] = normalize (xyz (gl.model_view_matrix_inverse_transpose) * vin.normal); 331 vout.tex_coord[3] = normalize (xyz (gl.model_view_matrix_inverse_transpose) * vin.normal);
333 vout.tex_coord[4] = normalize (xyz (gl.projection_matrix_inverse_transpose) - wpos); 332 vout.tex_coord[4] = normalize (xyz (gl.projection_matrix_inverse_transpose) - wpos);
334 333
335 vsh->end (); 334 vsh->end ();
336 vsh->compile (); 335 //vsh->compile ();
336
337 fragment_shader fsh;
338
339 fsh->start ();
340
341 xyz (fout.frag_color) = noise3 (x (fin.frag_coord) * y (fin.frag_coord));
342
343 temp_1f spec_expon;
344 spec_expon = 200;
345
346 fsh->end ();
347 fsh->compile ();
348
349 //abort ();
337 } 350 }
338 351
339} 352}
340 353

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines