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.18 by gwlarson, Mon Jul 19 20:15:16 1999 UTC vs.
Revision 3.19 by greg, Sat Feb 22 02:07:24 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1999 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * OpenGL driver for holodeck display.
6   * Based on GLX driver using T-mesh.
# Line 27 | Line 24 | static char SCCSid[] = "$SunId$ SGI";
24   #ifdef STEREO
25   #include <X11/extensions/SGIStereo.h>
26   #endif
27 + #include <time.h>
28  
29   #include "rhd_odraw.h"
30   #ifdef DOBJ
# Line 557 | Line 555 | xferdepth()                    /* load and clear depth buffer */
555          glClear(GL_DEPTH_BUFFER_BIT);           /* clear system depth buffer */
556          odDepthMap(0, depthbuffer);             /* transfer depth data */
557          if (pbuf != NULL)
558 <                free((char *)pbuf);             /* free our portal buffer */
558 >                free((void *)pbuf);             /* free our portal buffer */
559   }
560  
561  
# Line 568 | Line 566 | freedepth()                            /* free recorded depth buffer */
566                  return;
567   #ifdef STEREO
568          odDepthMap(1, NULL);
569 <        free((char *)depthright);
569 >        free((void *)depthright);
570          depthright = NULL;
571   #endif
572          odDepthMap(0, NULL);
573 <        free((char *)depthbuffer);
573 >        free((void *)depthbuffer);
574          depthbuffer = NULL;
575   }
576  
# Line 792 | Line 790 | XButtonPressedEvent    *ebut;
790  
791  
792   static
793 + waitabit()                              /* pause a moment */
794 + {
795 +        struct timespec ts;
796 +        ts.tv_sec = 0;
797 +        ts.tv_nsec = 5000000;
798 +        nanosleep(&ts, NULL);
799 + }
800 +
801 +
802 + static
803   getmove(ebut)                           /* get view change */
804   XButtonPressedEvent     *ebut;
805   {
# Line 808 | Line 816 | XButtonPressedEvent    *ebut;
816          setglpersp();                   /* start us off in perspective */
817          while (!XCheckMaskEvent(ourdisplay,
818                          ButtonReleaseMask, levptr(XEvent))) {
819 +                                        /* pause so as not to move too fast */
820 +                waitabit();
821                                          /* get cursor position */
822                  if (!XQueryPointer(ourdisplay, gwind, &rootw, &childw,
823                                  &rootx, &rooty, &wx, &wy, &statemask))
# Line 868 | Line 878 | setglpersp()                   /* set perspective view in GL */
878          if (odev.v.vaft > FTINY)
879                  dev_zmax = odev.v.vaft;
880          if (dev_zmin*500. < dev_zmax)
881 <                dev_zmax = dev_zmin*500.;
881 >                dev_zmin = dev_zmax/500.;
882          setzrat();
883          xmax = dev_zmin * tan(PI/180./2. * odev.v.horiz);
884          xmin = -xmax;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines