| 45 |
|
int hresolu = 0; /* horizontal (scan) size */ |
| 46 |
|
int vresolu = 0; /* vertical resolution */ |
| 47 |
|
|
| 48 |
< |
int castonly = 0; /* only doing ray-casting? */ |
| 48 |
> |
extern int castonly; /* only doing ray-casting? */ |
| 49 |
|
|
| 50 |
|
int imm_irrad = 0; /* compute immediate irradiance? */ |
| 51 |
|
int lim_dist = 0; /* limit distance? */ |
| 251 |
|
goto badopt; |
| 252 |
|
} |
| 253 |
|
} |
| 254 |
< |
if (nproc > 1) { |
| 255 |
< |
if (persist) |
| 256 |
< |
error(USER, "multiprocessing incompatible with persist file"); |
| 257 |
< |
if (!vresolu && hresolu > 0 && hresolu < nproc) |
| 258 |
< |
error(WARNING, "number of cores should not exceed horizontal resolution"); |
| 259 |
< |
if (trace != NULL) |
| 260 |
< |
error(WARNING, "multiprocessing does not work properly with trace mode"); |
| 261 |
< |
} |
| 254 |
> |
if (nproc > 1 && persist) |
| 255 |
> |
error(USER, "multiprocessing incompatible with persist file"); |
| 256 |
|
/* initialize object types */ |
| 257 |
|
initotypes(); |
| 258 |
|
/* initialize urand */ |
| 333 |
|
marksources(); /* find and mark sources */ |
| 334 |
|
|
| 335 |
|
setambient(); /* initialize ambient calculation */ |
| 336 |
< |
} |
| 336 |
> |
} else |
| 337 |
> |
distantsources(); /* else mark only distant sources */ |
| 338 |
> |
|
| 339 |
> |
fflush(stdout); /* in case we're duplicating header */ |
| 340 |
> |
|
| 341 |
|
#ifdef PERSIST |
| 342 |
|
if (persist) { |
| 345 |
– |
fflush(stdout); |
| 343 |
|
/* reconnect stdout */ |
| 344 |
|
dup2(duped1, fileno(stdout)); |
| 345 |
|
close(duped1); |