57 |
|
"AdaptiveShadowTesting\nOutputs=v,l\n" \ |
58 |
|
"OutputCS=RGB,XYZ,prims,spec\n" |
59 |
|
|
60 |
– |
|
60 |
|
void |
61 |
|
quit(int code) /* quit program */ |
62 |
|
{ |
63 |
< |
if (ray_pnprocs < 0) |
64 |
< |
_exit(code); /* avoid flush in child */ |
63 |
> |
if (!code) |
64 |
> |
code = myRPmanager.Cleanup(); |
65 |
|
|
67 |
– |
int ec = myRPmanager.Cleanup(); |
68 |
– |
|
69 |
– |
if (ec) code = ec; |
70 |
– |
|
66 |
|
exit(code); |
67 |
|
} |
68 |
|
|
69 |
+ |
/* Set default options */ |
70 |
+ |
static void |
71 |
+ |
default_options(void) |
72 |
+ |
{ |
73 |
+ |
shadthresh = .05; |
74 |
+ |
shadcert = .5; |
75 |
+ |
srcsizerat = .25; |
76 |
+ |
directrelay = 1; |
77 |
+ |
ambacc = 0.2; |
78 |
+ |
ambres = 64; |
79 |
+ |
ambdiv = 512; |
80 |
+ |
ambssamp = 128; |
81 |
+ |
maxdepth = 7; |
82 |
+ |
} |
83 |
|
|
84 |
|
int |
85 |
|
main(int argc, char *argv[]) |
110 |
|
strcat(RFeatureList, RXPICT_FEATURES); |
111 |
|
if (argc > 1 && !strcmp(argv[1], "-features")) |
112 |
|
return feature_status(argc-2, argv+2); |
113 |
+ |
/* set defaults */ |
114 |
+ |
default_options(); |
115 |
|
/* option city */ |
116 |
|
for (i = 1; i < argc; i++) { |
117 |
|
/* expand arguments */ |