26 |
|
|
27 |
|
int do_outside = 0; /* render from outside sections */ |
28 |
|
|
29 |
+ |
double eyesepdist = 1; /* eye separation distance */ |
30 |
+ |
|
31 |
|
char *progname; /* global argv[0] */ |
32 |
|
|
33 |
|
FILE *sstdin, *sstdout; /* server's standard input and output */ |
95 |
|
if (inp & DFL(DC_PAUSE)) |
96 |
|
pause = 1; |
97 |
|
if (inp & DFL(DC_REDRAW)) |
98 |
< |
imm_mode = beam_sync() > 0; |
98 |
> |
imm_mode = beam_sync(1) > 0; |
99 |
|
if (inp & DFL(DC_KILL)) { |
100 |
|
serv_request(DR_KILL, 0, NULL); |
101 |
|
pause = 0; |
249 |
|
{ |
250 |
|
static VIEW viewhist[VIEWHISTLEN]; |
251 |
|
static unsigned nhist; |
252 |
+ |
VIEW *dv; |
253 |
+ |
int i, res[2]; |
254 |
|
char *err; |
255 |
|
/* restore previous view? */ |
256 |
|
if (v == NULL) { |
270 |
|
error(COMMAND, "cannot handle parallel views"); |
271 |
|
return; |
272 |
|
} |
273 |
< |
if (!dev_view(v)) /* update display driver */ |
273 |
> |
if (!dev_view(v)) /* notify display driver */ |
274 |
|
goto again; |
275 |
|
dev_flush(); /* update screen */ |
276 |
< |
if (!beam_view(v)) /* update beam list */ |
277 |
< |
goto again; |
276 |
> |
beam_init(); /* compute new beam set */ |
277 |
> |
for (i = 0; (dv = dev_auxview(i, res)) != NULL; i++) |
278 |
> |
if (!beam_view(dv, res[0], res[1])) { |
279 |
> |
if (!nhist) { |
280 |
> |
error(COMMAND, "invalid starting view"); |
281 |
> |
return; |
282 |
> |
} |
283 |
> |
copystruct(v, viewhist + ((nhist-1)%VIEWHISTLEN)); |
284 |
> |
goto again; |
285 |
> |
} |
286 |
> |
beam_sync(0); /* update server */ |
287 |
|
/* record new view */ |
288 |
|
if (v < viewhist || v >= viewhist+VIEWHISTLEN) { |
289 |
|
copystruct(viewhist + (nhist%VIEWHISTLEN), v); |
340 |
|
/* handled in main() */ |
341 |
|
break; |
342 |
|
case DC_REDRAW: /* redraw from server */ |
343 |
< |
imm_mode = beam_sync() > 0; |
343 |
> |
imm_mode = beam_sync(1) > 0; |
344 |
|
dev_clear(); |
345 |
|
break; |
346 |
|
case DC_KILL: /* kill rtrace process(es) */ |
407 |
|
break; |
408 |
|
case DS_OUTSECT: |
409 |
|
do_outside = 1; |
410 |
+ |
break; |
411 |
+ |
case DS_EYESEP: |
412 |
+ |
if (msg.nbytes <= 1 || (eyesepdist = atof(buf)) <= FTINY) |
413 |
+ |
error(INTERNAL, "bad eye separation from server"); |
414 |
|
break; |
415 |
|
case DS_STARTIMM: |
416 |
|
case DS_ENDIMM: |