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

Comparing libgender/view.C (file contents):
Revision 1.32 by root, Wed Oct 6 17:55:40 2004 UTC vs.
Revision 1.33 by root, Wed Oct 6 19:45:29 2004 UTC

34 glMatrixMode (GL_PROJECTION); 34 glMatrixMode (GL_PROJECTION);
35 glLoadIdentity (); 35 glLoadIdentity ();
36 36
37 gl_error = glGetError (); 37 gl_error = glGetError ();
38 GLdouble aspect = (GLdouble)w/h; 38 GLdouble aspect = (GLdouble)w/h;
39 GLdouble zNear = 0.1; 39 GLdouble zNear = 1.;
40 GLdouble zFar = 50.; 40 GLdouble zFar = 500.;
41 41
42 gl_error = glGetError (); 42 gl_error = glGetError ();
43 GLdouble ymax = zNear * tan (fov * (M_PI / 360.0)); 43 GLdouble ymax = zNear * tan (fov * (M_PI / 360.0));
44 glFrustum (-ymax * aspect, ymax * aspect, -ymax, ymax, zNear, zFar); 44 glFrustum (-ymax * aspect, ymax * aspect, -ymax, ymax, zNear, zFar);
45 45
153 cgGLDisableProfile (vsh_profile); 153 cgGLDisableProfile (vsh_profile);
154 cgGLDisableProfile (fsh_profile); 154 cgGLDisableProfile (fsh_profile);
155#endif 155#endif
156 glShadeModel (GL_FLAT); 156 glShadeModel (GL_FLAT);
157 157
158#if 0
158 static int count; count++; 159 static int count; count++;
159 if (farlist.size ()) 160 if (farlist.size ())
160 printf ("%d: size %d\n", count, farlist.size ()); 161 printf ("%d: size %d\n", count, farlist.size ());
162#endif
161 163
162 for (vector<octant *>::iterator i = farlist.begin (); i != farlist.end (); ++i) 164 for (vector<octant *>::iterator i = farlist.begin (); i != farlist.end (); ++i)
163 { 165 {
164 glColor3f (1 / (GLfloat)(i - farlist.begin()), 1, 1 / (GLfloat)(i - farlist.begin())); 166 glColor3f (1,0,0);
165 (*i)->draw_bbox (*this); 167 (*i)->draw_bbox (*this);
166 } 168 }
167 169
168 glEnable (GL_DEPTH_TEST); 170 glEnable (GL_DEPTH_TEST);
169 glDisable (GL_DEPTH_CLAMP_NV); 171 glDisable (GL_DEPTH_CLAMP_NV);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines