ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rhd_glx.c
(Generate patch)

Comparing ray/src/hd/rhd_glx.c (file contents):
Revision 3.29 by greg, Sat Feb 22 02:07:24 2003 UTC vs.
Revision 3.31 by greg, Fri Sep 19 18:33:04 2003 UTC

# Line 223 | Line 223 | char  *id;
223          setstereobuf(STEREO_BUFFER_LEFT);
224   #endif
225          checkglerr("setting rendering parameters");
226 <        copystruct(&odev.v, &stdview);
226 >        odev.v = stdview;
227          odev.v.type = VT_PER;
228                                          /* map the window */
229          XMapWindow(ourdisplay, gwind);
# Line 306 | Line 306 | register VIEW  *nv;
306                          XResizeWindow(ourdisplay, gwind, odev.hres, odev.vres);
307                          dev_input();    /* get resize event */
308                  }
309 <                copystruct(&odev.v, nv);        /* setview() already called */
309 >                odev.v = *nv;   /* setview() already called */
310          }
311   #ifdef STEREO
312 <        copystruct(&vwright, nv);
312 >        vwright = *nv;
313          d = eyesepdist / sqrt(nv->hn2);
314          VSUM(vwright.vp, nv->vp, nv->hvec, d);
315          /* setview(&vwright);   -- Unnecessary */
# Line 543 | Line 543 | FVECT  direc;
543          if (dx<0 | dx>=odev.hres | dy<0 | dy>=odev.vres)
544                  return(FHUGE);
545          glReadPixels(dx,dy, 1,1, GL_DEPTH_COMPONENT,GL_FLOAT, &gldepth);
546 +        if (gldepth <= FTINY)
547 +                return (FHUGE); /* call failed */
548          dist = mapdepth(gldepth);
549          if (dist >= .99*FHUGE)
550                  return(FHUGE);
# Line 559 | Line 561 | int    dx, dy, mov, orb;
561          double  d,d1;
562          register int    li;
563                                  /* start with old view */
564 <        copystruct(&nv, &odev.v);
564 >        nv = odev.v;
565                                  /* orient our motion */
566          if (viewray(v1, odir, &odev.v,
567                          (dx+.5)/odev.hres, (dy+.5)/odev.vres) < -FTINY)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines