55 |
|
static void sigdie(int signo, char *msg); |
56 |
|
static void printdefaults(void); |
57 |
|
|
58 |
– |
|
58 |
|
int |
59 |
|
main(int argc, char *argv[]) |
60 |
|
{ |
83 |
|
specthresh = .3; |
84 |
|
specjitter = 1.; |
85 |
|
maxdepth = 6; |
86 |
< |
minweight = 1e-2; |
86 |
> |
minweight = 1e-3; |
87 |
|
ambacc = 0.3; |
88 |
|
ambres = 32; |
89 |
|
ambdiv = 256; |
191 |
|
goto badopt; |
192 |
|
} |
193 |
|
} |
194 |
+ |
/* set/check spectral sampling */ |
195 |
+ |
if (setspectrsamp(CNDX, WLPART) <= 0) |
196 |
+ |
error(USER, "unsupported spectral sampling"); |
197 |
+ |
|
198 |
|
err = setview(&ourview); /* set viewing parameters */ |
199 |
|
if (err != NULL) |
200 |
|
error(USER, err); |
233 |
|
|
234 |
|
ray_init(octnm); /* also calls ray_init_pmap() */ |
235 |
|
|
236 |
+ |
/* temporary shortcut, until winrview is refactored into a "device" */ |
237 |
+ |
#ifndef WIN_RVIEW |
238 |
|
rview(); /* run interactive viewer */ |
239 |
|
|
240 |
+ |
|
241 |
|
devclose(); /* close output device */ |
242 |
+ |
#endif |
243 |
|
|
244 |
|
/* PMAP: free photon maps */ |
245 |
|
ray_done_pmap(); |
246 |
|
|
247 |
+ |
#ifdef WIN_RVIEW |
248 |
+ |
return 1; |
249 |
+ |
#endif |
250 |
|
quit(0); |
251 |
|
|
252 |
|
badopt: |
261 |
|
|
262 |
|
void |
263 |
|
wputs( /* warning output function */ |
264 |
< |
char *s |
264 |
> |
const char *s |
265 |
|
) |
266 |
|
{ |
267 |
|
int lasterrno = errno; |
268 |
+ |
if (erract[WARNING].pf == NULL) |
269 |
+ |
return; /* called by calcomp or someone */ |
270 |
|
eputs(s); |
271 |
|
errno = lasterrno; |
272 |
|
} |
274 |
|
|
275 |
|
void |
276 |
|
eputs( /* put string to stderr */ |
277 |
< |
char *s |
277 |
> |
const char *s |
278 |
|
) |
279 |
|
{ |
280 |
|
static int midline = 0; |