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.26 by greg, Fri Jun 20 16:34:23 2025 UTC

# Line 16 | Line 16 | static const char      RCSid[] = "$Id$";
16   #include  "ambient.h"
17   #include  "rpaint.h"
18   #include  "random.h"
19 #include  "paths.h"
19   #include  "view.h"
20   #include  "pmapray.h"
21  
23 extern char  *progname;                 /* global argv[0] */
24
22   VIEW  ourview = STDVIEW;                /* viewing parameters */
23   int  hresolu, vresolu;                  /* image resolution */
24  
# Line 55 | Line 52 | static void onsig(int  signo);
52   static void sigdie(int  signo, char  *msg);
53   static void printdefaults(void);
54  
55 + static void
56 + set_defaults(void)
57 + {
58 +        shadthresh = .1;
59 +        shadcert = .25;
60 +        directrelay = 0;
61 +        vspretest = 128;
62 +        srcsizerat = 0.;
63 +        specthresh = .3;
64 +        specjitter = 1.;
65 +        maxdepth = 6;
66 +        minweight = 1e-3;
67 +        ambacc = 0.3;
68 +        ambres = 32;
69 +        ambdiv = 256;
70 +        ambssamp = 64;
71 + }
72 +
73   int
74   main(int argc, char *argv[])
75   {
# Line 75 | Line 90 | main(int argc, char *argv[])
90                                          /* global program name */
91          progname = argv[0] = fixargv0(argv[0]);
92                                          /* set our defaults */
93 <        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;
93 >        set_defaults();
94                                          /* option city */
95          for (i = 1; i < argc; i++) {
96                                                  /* expand arguments */
# Line 191 | Line 194 | main(int argc, char *argv[])
194                          goto badopt;
195                  }
196          }
197 +                                        /* set/check spectral sampling */
198 +        if (setspectrsamp(CNDX, WLPART) <= 0)
199 +                error(USER, "unsupported spectral sampling");
200 +
201          err = setview(&ourview);        /* set viewing parameters */
202          if (err != NULL)
203                  error(USER, err);
# Line 257 | Line 264 | badopt:
264  
265   void
266   wputs(                          /* warning output function */
267 <        char    *s
267 >        const char      *s
268   )
269   {
270          int  lasterrno = errno;
271 +        if (erract[WARNING].pf == NULL)
272 +                return;         /* called by calcomp or someone */
273          eputs(s);
274          errno = lasterrno;
275   }
# Line 268 | Line 277 | wputs(                         /* warning output function */
277  
278   void
279   eputs(                          /* put string to stderr */
280 <        char  *s
280 >        const char  *s
281   )
282   {
283          static int  midline = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines