30 |
|
char *progname; /* argv[0] */ |
31 |
|
char *octname; /* octree name */ |
32 |
|
char *sigerr[NSIG]; /* signal error messages */ |
33 |
– |
char *shm_boundary = NULL; /* boundary of shared memory */ |
33 |
|
char *errfile = NULL; /* error output file */ |
34 |
|
|
35 |
|
extern time_t time(); |
65 |
|
"HessianAmbientCache\nAmbientAveraging\nAmbientValueSharing\n" \ |
66 |
|
"PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \ |
67 |
|
"SmallSourceDrawing\nViewSequence\nProgressReporting\n" \ |
68 |
< |
"AdaptiveShadowTesting\nOutputs=v,l\n" |
68 |
> |
"AdaptiveShadowTesting\nOutputs=v,l\n" \ |
69 |
> |
"OutputCS=RGB,XYZ,prims\n" |
70 |
|
#else |
71 |
|
#define RPICT_FEATURES "Recovery\nIrradianceCalc\nViewTypes=v,l,a,h,s,c\n" \ |
72 |
|
"ParticipatingMedia=Mist\n" \ |
73 |
|
"HessianAmbientCache\nAmbientAveraging\nAmbientValueSharing\n" \ |
74 |
|
"PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \ |
75 |
|
"SmallSourceDrawing\nViewSequence\nProgressReporting\n" \ |
76 |
< |
"AdaptiveShadowTesting\nOutputs=v,l\n" |
76 |
> |
"AdaptiveShadowTesting\nOutputs=v,l\n" \ |
77 |
> |
"OutputCS=RGB,XYZ,prims\n" |
78 |
|
#endif |
79 |
|
|
80 |
|
|
241 |
|
check(2,"s"); |
242 |
|
recover = argv[++i]; |
243 |
|
break; |
243 |
– |
case 't': /* timer */ |
244 |
– |
check(2,"i"); |
245 |
– |
ralrm = atoi(argv[++i]); |
246 |
– |
break; |
244 |
|
#ifdef PERSIST |
245 |
|
case 'P': /* persist file */ |
246 |
|
if (argv[i][2] == 'P') { |
253 |
|
persistfile(argv[++i]); |
254 |
|
break; |
255 |
|
#endif |
256 |
+ |
case 't': /* timer */ |
257 |
+ |
check(2,"i"); |
258 |
+ |
ralrm = atoi(argv[++i]); |
259 |
+ |
break; |
260 |
|
case 'w': /* warnings */ |
261 |
|
rval = erract[WARNING].pf != NULL; |
262 |
|
check_bool(2,rval); |
271 |
|
goto badopt; |
272 |
|
} |
273 |
|
} |
274 |
+ |
/* set/check spectral sampling */ |
275 |
+ |
if (setspectrsamp(CNDX, WLPART) <= 0) |
276 |
+ |
error(USER, "unsupported spectral sampling"); |
277 |
+ |
|
278 |
|
err = setview(&ourview); /* set viewing parameters */ |
279 |
|
if (err != NULL) |
280 |
|
error(USER, err); |
354 |
|
ray_init_pmap(); /* PMAP: set up & load photon maps */ |
355 |
|
|
356 |
|
marksources(); /* find and mark sources */ |
352 |
– |
|
357 |
|
setambient(); /* initialize ambient calculation */ |
358 |
|
|
359 |
|
fflush(stdout); /* in case we're duplicating header */ |
365 |
|
close(duped1); |
366 |
|
} |
367 |
|
if (persist == PARALLEL) { /* multiprocessing */ |
368 |
< |
preload_objs(); /* preload scene */ |
365 |
< |
shm_boundary = (char *)malloc(16); |
366 |
< |
strcpy(shm_boundary, "SHM_BOUNDARY"); |
368 |
> |
cow_memshare(); /* preloads scene */ |
369 |
|
while ((rval=fork()) == 0) { /* keep on forkin' */ |
370 |
|
pflock(1); |
371 |
|
pfhold(); |
431 |
|
) |
432 |
|
{ |
433 |
|
int lasterrno = errno; |
434 |
+ |
if (erract[WARNING].pf == NULL) |
435 |
+ |
return; /* called by calcomp or someone */ |
436 |
|
eputs(s); |
437 |
|
errno = lasterrno; |
438 |
|
} |