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.17 by greg, Thu Aug 18 00:52:48 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[])
78   {
# Line 75 | 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;
79 <        shadcert = .25;
80 <        directrelay = 0;
81 <        vspretest = 128;
82 <        srcsizerat = 0.;
83 <        specthresh = .3;
84 <        specjitter = 1.;
85 <        maxdepth = 6;
86 <        minweight = 1e-2;
87 <        ambacc = 0.3;
88 <        ambres = 32;
89 <        ambdiv = 256;
90 <        ambssamp = 64;
96 >        set_defaults();
97                                          /* option city */
98          for (i = 1; i < argc; i++) {
99                                                  /* expand arguments */
# Line 191 | 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 257 | 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 268 | 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