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

Comparing libgender/view.C (file contents):
Revision 1.73 by root, Sat Nov 6 00:06:33 2004 UTC vs.
Revision 1.74 by root, Sat Nov 6 04:26:18 2004 UTC

109 GLdouble ftan = tan (fov * (.5 * M_PI / 180.)); 109 GLdouble ftan = tan (fov * (.5 * M_PI / 180.));
110 GLdouble ymax = z_near * ftan; 110 GLdouble ymax = z_near * ftan;
111 GLdouble xmax = ymax * aspect; 111 GLdouble xmax = ymax * aspect;
112 112
113 matrix perspective; 113 matrix perspective;
114#if 0 114#if 1
115 { 115 {
116 matrix &m = perspective; 116 matrix &m = perspective;
117 m(0,0) = rx.x; m(0,1) = rx.y; m(0,2) = rx.z; m(0,3) = 0; 117
118 m(1,0) = ry.x; m(1,1) = ry.y; m(1,2) = ry.z; m(1,3) = 0; 118 m(0,0) = 1.F / xmax; m(0,1) = 0; m(0,2) = 0; m(0,3) = 0;
119 m(2,0) = rz.x; m(2,1) = rz.y; m(2,2) = rz.z; m(2,3) = 0; 119 m(1,0) = 0; m(1,1) = 1.F / ymax; m(1,2) = 0; m(1,3) = 0;
120 m(2,0) = 0; m(2,1) = 0; m(2,2) = -2.F / z_far; m(2,3) = 0;
120 m(3,0) = 0; m(3,1) = 0; m(3,2) = 0; m(3,3) = 1; 121 m(3,0) = 0; m(3,1) = 0; m(3,2) = -1; m(3,3) = 0;
121 122
122 LoadMatrixf (perspective); 123 glLoadMatrixf (perspective);
123 } 124 }
124#else 125#else
125 glFrustum (-xmax, xmax, -ymax, ymax, z_near, z_far); 126 glFrustum (-xmax, xmax, -ymax, ymax, z_near, z_far);
126#endif 127#endif
127 128

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines