18 |
|
#include "random.h" |
19 |
|
#include "paths.h" |
20 |
|
#include "view.h" |
21 |
+ |
#include "pmapray.h" |
22 |
|
|
23 |
|
/* persistent processes define */ |
24 |
|
#ifdef F_SETLKW |
286 |
|
#endif |
287 |
|
if (outfile != NULL) |
288 |
|
openheader(); |
289 |
< |
#ifdef _WIN32 |
289 |
> |
#if defined(_WIN32) || defined(_WIN64) |
290 |
|
SET_FILE_BINARY(stdout); |
291 |
|
if (octname == NULL) |
292 |
|
SET_FILE_BINARY(stdin); |
298 |
|
printargs(i, argv, stdout); |
299 |
|
printf("SOFTWARE= %s\n", VersionID); |
300 |
|
} |
301 |
+ |
|
302 |
+ |
ray_init_pmap(); /* PMAP: set up & load photon maps */ |
303 |
|
|
304 |
|
marksources(); /* find and mark sources */ |
305 |
|
|
306 |
|
setambient(); /* initialize ambient calculation */ |
307 |
< |
|
307 |
> |
|
308 |
|
#ifdef PERSIST |
309 |
|
if (persist) { |
310 |
|
fflush(stdout); |
359 |
|
goto runagain; |
360 |
|
} |
361 |
|
#endif |
362 |
+ |
|
363 |
+ |
|
364 |
+ |
ray_done_pmap(); /* PMAP: free photon maps */ |
365 |
+ |
|
366 |
|
quit(0); |
367 |
|
|
368 |
|
badopt: |