--- ray/src/hd/rhd_x11.c 1997/12/24 14:04:22 3.18 +++ ray/src/hd/rhd_x11.c 1998/01/04 08:32:01 3.22 @@ -18,6 +18,10 @@ static char SCCSid[] = "$SunId$ SGI"; #include "x11icon.h" +#ifndef RAYQLEN +#define RAYQLEN 50000 /* max. rays to queue before flush */ +#endif + #ifndef FEQ #define FEQ(a,b) ((a)-(b) <= FTINY && (a)-(b) >= -FTINY) #endif @@ -81,9 +85,9 @@ mytmflags() /* figure out tone mapping flags */ for (cp = tail; *cp && *cp != '.'; cp++) ; if (cp-tail == 3 && !strncmp(tail, "x11", 3)) - return(TM_F_CAMERA); + return(TM_F_CAMERA|TM_F_NOSTDERR); if (cp-tail == 4 && !strncmp(tail, "x11h", 4)) - return(TM_F_HUMAN); + return(TM_F_HUMAN|TM_F_NOSTDERR); error(USER, "illegal driver name"); } @@ -170,8 +174,8 @@ char *id; dev_input(); /* sets size and view angles */ /* allocate our leaf pile */ if (!qtAllocLeaves(DisplayWidth(ourdisplay,ourscreen) * - DisplayHeight(ourdisplay,ourscreen) / - (qtMinNodesiz*qtMinNodesiz))) + DisplayHeight(ourdisplay,ourscreen) * 3 / + (qtMinNodesiz*qtMinNodesiz*2))) error(SYSTEM, "insufficient memory for leaf storage"); odev.name = id; odev.ifd = ConnectionNumber(ourdisplay); @@ -278,6 +282,7 @@ int dev_flush() /* flush output */ { qtUpdate(); + rayqleft = RAYQLEN; return(XPending(ourdisplay)); } @@ -453,7 +458,7 @@ draw_grids() /* draw holodeck section grids */ static BYTE gridrgb[3] = {0x0, 0xff, 0xff}; unsigned long pixel; - if (!mapped || odev.v.type != VT_PER) + if (!mapped) return; if (ncolors > 0) pixel = pixval[get_pixel(gridrgb, xnewcolr)]; @@ -599,6 +604,7 @@ register XKeyPressedEvent *ekey; if (ncolors > 0) new_ctab(ncolors); inpresflags |= DFL(DC_REDRAW); /* resend values from server */ + rayqleft = 0; /* hold off update */ return; case 'K': /* kill rtrace process(es) */ inpresflags |= DFL(DC_KILL);