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 |
+ |
rval = setspectrsamp(CNDX, WLPART); |
196 |
+ |
if (rval < 0) |
197 |
+ |
error(USER, "unsupported spectral sampling"); |
198 |
+ |
|
199 |
|
err = setview(&ourview); /* set viewing parameters */ |
200 |
|
if (err != NULL) |
201 |
|
error(USER, err); |
234 |
|
|
235 |
|
ray_init(octnm); /* also calls ray_init_pmap() */ |
236 |
|
|
237 |
+ |
/* temporary shortcut, until winrview is refactored into a "device" */ |
238 |
+ |
#ifndef WIN_RVIEW |
239 |
|
rview(); /* run interactive viewer */ |
240 |
|
|
241 |
+ |
|
242 |
|
devclose(); /* close output device */ |
243 |
+ |
#endif |
244 |
|
|
245 |
|
/* PMAP: free photon maps */ |
246 |
|
ray_done_pmap(); |
247 |
|
|
248 |
+ |
#ifdef WIN_RVIEW |
249 |
+ |
return 1; |
250 |
+ |
#endif |
251 |
|
quit(0); |
252 |
|
|
253 |
|
badopt: |
262 |
|
|
263 |
|
void |
264 |
|
wputs( /* warning output function */ |
265 |
< |
char *s |
265 |
> |
const char *s |
266 |
|
) |
267 |
|
{ |
268 |
|
int lasterrno = errno; |
273 |
|
|
274 |
|
void |
275 |
|
eputs( /* put string to stderr */ |
276 |
< |
char *s |
276 |
> |
const char *s |
277 |
|
) |
278 |
|
{ |
279 |
|
static int midline = 0; |