--- ray/src/hd/rhdisp.c 1997/11/21 16:10:17 3.4 +++ ray/src/hd/rhdisp.c 1997/12/04 10:54:24 3.9 @@ -17,8 +17,6 @@ HOLO *hdlist[HDMAX+1]; /* global holodeck list */ int imm_mode = 0; /* bundles are being delivered immediately */ -VIEW dvw; /* our current display view */ - char *progname; /* global argv[0] */ #define RDY_SRV 01 @@ -46,8 +44,8 @@ char *argv[]; if (inp & DEV_SHUTDOWN) serv_request(DR_SHUTDOWN, 0, NULL); if (inp & DEV_REDRAW) { - beam_sync(); imm_mode = 1; /* preempt updates */ + beam_sync(); } if (inp & DEV_WAIT) pause = 1; @@ -150,7 +148,7 @@ register PACKHEAD *p; hdray(ro, rd, hdlist[p->hd], gc, packra(p)[i].r); d = hddepth(hdlist[p->hd], packra(p)[i].d); VSUM(wp, ro, rd, d); /* might be behind viewpoint */ - dev_value(packra(p)[i].v, wp); + dev_value(packra(p)[i].v, wp, rd); } } @@ -160,11 +158,12 @@ VIEW *v; { char *err; - if ((err = setview(v)) != NULL) - error(INTERNAL, err); - dev_view(v); /* update display driver */ - beam_view(&dvw, v); /* update beam list */ - copystruct(&dvw, v); /* record new view */ + do { + if ((err = setview(v)) != NULL) + error(INTERNAL, err); + dev_view(v); /* update display driver */ + dev_flush(); /* update screen */ + } while (!beam_view(v)); /* update beam list */ } @@ -205,6 +204,8 @@ serv_result() /* get next server result and process case DS_STARTIMM: case DS_ENDIMM: imm_mode = msg.type==DS_STARTIMM; + if (msg.type == DS_ENDIMM) + dev_flush(); /* update display NOW */ /* fall through */ case DS_ACKNOW: case DS_SHUTDOWN: