--- ray/src/hd/rhd_glx.c 1997/12/26 14:12:37 3.4 +++ ray/src/hd/rhd_glx.c 1997/12/26 21:56:43 3.8 @@ -161,7 +161,6 @@ char *id; /* map the window */ XMapWindow(ourdisplay, gwind); dev_input(); /* sets size and view angles */ - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* allocate our leaf pile */ if (!qtAllocLeaves(2 * DisplayWidth(ourdisplay,ourscreen) * DisplayHeight(ourdisplay,ourscreen) / @@ -284,7 +283,7 @@ double rad; else apexh = 1. - ip[2]/(curzmax*DEPTHFACT); } - /* find closest cone match */ + rad *= 1.25; /* find conservative cone match */ for (ci = 0; ci < MAXCONE-1; ci++) if (cone[ci].rad >= rad) break; @@ -567,12 +566,20 @@ register XKeyPressedEvent *ekey; inpresflags |= DFL(DC_RESUME); return; case CTRL('R'): /* redraw screen */ + if (nxtzmax > FTINY) { + curzmax = nxtzmax; + nxtzmax = 0.; + } glClear(GL_DEPTH_BUFFER_BIT); qtRedraw(0, 0, odev.hres, odev.vres); return; case CTRL('L'): /* refresh from server */ if (inpresflags & DFL(DC_REDRAW)) return; + if (nxtzmax > FTINY) { + curzmax = nxtzmax; + nxtzmax = 0.; + } glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); draw_grids(); glFlush(); @@ -627,6 +634,8 @@ static resizewindow(ersz) /* resize window */ register XConfigureEvent *ersz; { + glViewport(0, 0, ersz->width, ersz->height); + if (ersz->width == odev.hres && ersz->height == odev.vres) return; @@ -635,8 +644,6 @@ register XConfigureEvent *ersz; odev.v.horiz = 2.*180./PI * atan(0.5/VIEWDIST*pwidth*odev.hres); odev.v.vert = 2.*180./PI * atan(0.5/VIEWDIST*pheight*odev.vres); - - glViewport(0, 0, odev.hres, odev.vres); inpresflags |= DFL(DC_SETVIEW); }