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.5 by gregl, Fri Dec 26 14:46:21 1997 UTC vs.
Revision 3.9 by gregl, Tue Dec 30 16:59:46 1997 UTC

# Line 100 | Line 100 | char  *id;
100          XSizeHints      oursizhints;
101                                          /* set quadtree globals */
102          qtMinNodesiz = 3;
103 +        qtDepthEps = 0.07;
104                                          /* open display server */
105          ourdisplay = XOpenDisplay(NULL);
106          if (ourdisplay == NULL)
# Line 161 | Line 162 | char  *id;
162                                          /* map the window */
163          XMapWindow(ourdisplay, gwind);
164          dev_input();                    /* sets size and view angles */
164        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
165                                          /* allocate our leaf pile */
166 <        if (!qtAllocLeaves(2 * DisplayWidth(ourdisplay,ourscreen) *
166 >        if (!qtAllocLeaves(DisplayWidth(ourdisplay,ourscreen) *
167                          DisplayHeight(ourdisplay,ourscreen) /
168                          (qtMinNodesiz*qtMinNodesiz)))
169                  error(SYSTEM, "insufficient memory for value storage");
# Line 567 | Line 567 | register XKeyPressedEvent  *ekey;
567                  inpresflags |= DFL(DC_RESUME);
568                  return;
569          case CTRL('R'):                 /* redraw screen */
570 +                if (nxtzmax > FTINY) {
571 +                        curzmax = nxtzmax;
572 +                        nxtzmax = 0.;
573 +                }
574                  glClear(GL_DEPTH_BUFFER_BIT);
575                  qtRedraw(0, 0, odev.hres, odev.vres);
576                  return;
577          case CTRL('L'):                 /* refresh from server */
578                  if (inpresflags & DFL(DC_REDRAW))
579                          return;
580 +                if (nxtzmax > FTINY) {
581 +                        curzmax = nxtzmax;
582 +                        nxtzmax = 0.;
583 +                }
584                  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
585                  draw_grids();
586                  glFlush();
# Line 627 | Line 635 | static
635   resizewindow(ersz)                      /* resize window */
636   register XConfigureEvent  *ersz;
637   {
638 +        glViewport(0, 0, ersz->width, ersz->height);
639 +
640          if (ersz->width == odev.hres && ersz->height == odev.vres)
641                  return;
642  
# Line 635 | Line 645 | register XConfigureEvent  *ersz;
645  
646          odev.v.horiz = 2.*180./PI * atan(0.5/VIEWDIST*pwidth*odev.hres);
647          odev.v.vert = 2.*180./PI * atan(0.5/VIEWDIST*pheight*odev.vres);
638
639        glViewport(0, 0, odev.hres, odev.vres);
648  
649          inpresflags |= DFL(DC_SETVIEW);
650   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines