9 |
|
|
10 |
|
#include <signal.h> |
11 |
|
#include "rcontrib.h" |
12 |
– |
#include "platform.h" |
13 |
– |
#include "paths.h" |
12 |
|
#include "source.h" |
13 |
|
#include "ambient.h" |
14 |
|
|
17 |
– |
char *shm_boundary = NULL; /* boundary of shared memory */ |
18 |
– |
|
15 |
|
int gargc; /* global argc */ |
16 |
|
char **gargv; /* global argv */ |
17 |
|
char *octname; /* global octree name */ |
42 |
|
const char *modname[MAXMODLIST]; /* ordered modifier name list */ |
43 |
|
int nmods = 0; /* number of modifiers */ |
44 |
|
|
45 |
+ |
void (*addobjnotify[8])() = {ambnotify, NULL}; |
46 |
+ |
|
47 |
|
char RCCONTEXT[] = "RCONTRIB"; /* our special evaluation context */ |
48 |
|
|
51 |
– |
void (*addobjnotify[8])() = {ambnotify, tranotify, NULL}; |
49 |
|
|
53 |
– |
|
50 |
|
static void |
51 |
|
printdefaults(void) /* print default values to stdout */ |
52 |
|
{ |
53 |
|
char *cp; |
54 |
|
|
55 |
+ |
printf("-c %-5d\t\t\t# accumulated rays per record\n", accumulate); |
56 |
+ |
printf("-V%c\t\t\t\t# output %s\n", contrib ? '+' : '-', |
57 |
+ |
contrib ? "contributions" : "coefficients"); |
58 |
|
if (imm_irrad) |
59 |
|
printf("-I+\t\t\t\t# immediate irradiance on\n"); |
60 |
|
printf("-n %-2d\t\t\t\t# number of rendering processes\n", nproc); |
226 |
|
yres = atoi(argv[++i]); |
227 |
|
break; |
228 |
|
case 'w': /* warnings */ |
229 |
< |
rval = erract[WARNING].pf != NULL; |
229 |
> |
rval = (erract[WARNING].pf != NULL); |
230 |
|
bool(2,rval); |
231 |
|
if (rval) erract[WARNING].pf = wputs; |
232 |
|
else erract[WARNING].pf = NULL; |
338 |
|
|
339 |
|
setambient(); /* initialize ambient calculation */ |
340 |
|
|
341 |
< |
if (nproc > 1) { |
343 |
< |
preload_objs(); /* preload auxiliary data */ |
344 |
< |
/* set shared memory boundary */ |
345 |
< |
shm_boundary = strcpy((char *)malloc(16), "SHM_BOUNDARY"); |
346 |
< |
} |
347 |
< |
rcontrib(); /* trace ray contributions */ |
341 |
> |
rcontrib(); /* trace ray contributions (loop) */ |
342 |
|
|
343 |
|
ambsync(); /* flush ambient file */ |
344 |
|
|