ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rvmain.c
(Generate patch)

Comparing ray/src/rt/rvmain.c (file contents):
Revision 2.15 by schorsch, Thu Mar 10 18:25:46 2016 UTC vs.
Revision 2.24 by greg, Wed Apr 23 02:35:26 2025 UTC

# Line 55 | Line 55 | static void onsig(int  signo);
55   static void sigdie(int  signo, char  *msg);
56   static void printdefaults(void);
57  
58 + static void
59 + set_defaults(void)
60 + {
61 +        shadthresh = .1;
62 +        shadcert = .25;
63 +        directrelay = 0;
64 +        vspretest = 128;
65 +        srcsizerat = 0.;
66 +        specthresh = .3;
67 +        specjitter = 1.;
68 +        maxdepth = 6;
69 +        minweight = 1e-3;
70 +        ambacc = 0.3;
71 +        ambres = 32;
72 +        ambdiv = 256;
73 +        ambssamp = 64;
74 + }
75  
76   int
77   main(int argc, char *argv[])
# Line 76 | Line 93 | main(int argc, char *argv[])
93                                          /* global program name */
94          progname = argv[0] = fixargv0(argv[0]);
95                                          /* set our defaults */
96 <        shadthresh = .1;
80 <        shadcert = .25;
81 <        directrelay = 0;
82 <        vspretest = 128;
83 <        srcsizerat = 0.;
84 <        specthresh = .3;
85 <        specjitter = 1.;
86 <        maxdepth = 6;
87 <        minweight = 1e-2;
88 <        ambacc = 0.3;
89 <        ambres = 32;
90 <        ambdiv = 256;
91 <        ambssamp = 64;
96 >        set_defaults();
97                                          /* option city */
98          for (i = 1; i < argc; i++) {
99                                                  /* expand arguments */
# Line 192 | Line 197 | main(int argc, char *argv[])
197                          goto badopt;
198                  }
199          }
200 +                                        /* set/check spectral sampling */
201 +        if (setspectrsamp(CNDX, WLPART) <= 0)
202 +                error(USER, "unsupported spectral sampling");
203 +
204          err = setview(&ourview);        /* set viewing parameters */
205          if (err != NULL)
206                  error(USER, err);
# Line 230 | Line 239 | main(int argc, char *argv[])
239          
240          ray_init(octnm);                /* also calls ray_init_pmap() */
241          
242 + /* temporary shortcut, until winrview is refactored into a "device" */
243 + #ifndef WIN_RVIEW
244          rview();                        /* run interactive viewer */
245  
246 +
247          devclose();                     /* close output device */
248 + #endif
249  
250          /* PMAP: free photon maps */
251          ray_done_pmap();
252          
253 + #ifdef WIN_RVIEW
254 +        return 1;
255 + #endif
256          quit(0);
257  
258   badopt:
# Line 251 | Line 267 | badopt:
267  
268   void
269   wputs(                          /* warning output function */
270 <        char    *s
270 >        const char      *s
271   )
272   {
273          int  lasterrno = errno;
274 +        if (erract[WARNING].pf == NULL)
275 +                return;         /* called by calcomp or someone */
276          eputs(s);
277          errno = lasterrno;
278   }
# Line 262 | Line 280 | wputs(                         /* warning output function */
280  
281   void
282   eputs(                          /* put string to stderr */
283 <        char  *s
283 >        const char  *s
284   )
285   {
286          static int  midline = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines