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

Comparing ray/src/hd/rhd_ogl.c (file contents):
Revision 3.21 by greg, Mon May 19 16:32:18 2003 UTC vs.
Revision 3.23 by greg, Fri Sep 19 18:33:05 2003 UTC

# Line 243 | Line 243 | char  *id;
243          setstereobuf(STEREO_BUFFER_LEFT);
244   #endif
245          checkglerr("setting rendering parameters");
246 <        copystruct(&odev.v, &stdview);
246 >        odev.v = stdview;
247          odev.v.type = VT_PER;
248          viewflags = VWSTEADY;           /* view starts static */
249                                          /* map the window */
# Line 330 | Line 330 | register VIEW  *nv;
330                          XResizeWindow(ourdisplay, gwind, odev.hres, odev.vres);
331                          dev_input();    /* get resize event */
332                  }
333 <                copystruct(&odev.v, nv);        /* setview() already called */
333 >                odev.v = *nv;   /* setview() already called */
334                  viewflags |= VWCHANGE;
335          }
336   #ifdef STEREO
337 <        copystruct(&vwright, nv);
337 >        vwright = *nv;
338          d = eyesepdist / sqrt(nv->hn2);
339          VSUM(vwright.vp, nv->vp, nv->hvec, d);
340          /* setview(&vwright);   -- Unnecessary */
# Line 589 | Line 589 | FVECT  direc;
589          else {
590                  glReadPixels(dx,dy, 1,1, GL_DEPTH_COMPONENT,
591                                  GL_FLOAT, &gldepth);
592 +                if (gldepth <= FTINY)
593 +                        return (FHUGE); /* call failed */
594                  dist = mapdepth(gldepth);
595          }
596          if (dist >= .99*FHUGE)
# Line 719 | Line 721 | int    dx, dy, mov, orb;
721          double  d, d1;
722          register int    li;
723                                  /* start with old view */
724 <        copystruct(&nv, &odev.v);
724 >        nv = odev.v;
725                                  /* orient our motion */
726          if (viewray(v1, odir, &odev.v,
727                          (dx+.5)/odev.hres, (dy+.5)/odev.vres) < -FTINY)
# Line 793 | Line 795 | waitabit()                             /* pause a moment */
795   {
796          struct timespec ts;
797          ts.tv_sec = 0;
798 <        ts.tv_nsec = 50000000;
798 >        ts.tv_nsec = 100000000L;
799          nanosleep(&ts, NULL);
800   }
801  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines