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

Comparing ray/src/rt/rtmain.c (file contents):
Revision 2.56 by greg, Wed Oct 30 16:47:03 2024 UTC vs.
Revision 2.62 by greg, Fri Dec 5 17:51:34 2025 UTC

# Line 13 | Line 13 | static const char      RCSid[] = "$Id$";
13   #include  "rtprocess.h" /* getpid() */
14   #include  "resolu.h"
15   #include  "ray.h"
16 + #include  "func.h"
17   #include  "source.h"
18   #include  "ambient.h"
19   #include  "random.h"
19 #include  "paths.h"
20   #include  "pmapray.h"
21
22 extern char     *progname;              /* global argv[0] */
23
21                                          /* persistent processes define */
22   #ifdef  F_SETLKW
23   #define  PERSIST        1               /* normal persist */
# Line 114 | Line 111 | main(int  argc, char  *argv[])
111          strcat(RFeatureList, RTRACE_FEATURES);
112          if (argc > 1 && !strcmp(argv[1], "-features"))
113                  return feature_status(argc-2, argv+2);
114 +                                        /* initialize calcomp routines */
115 +        initfunc();
116                                          /* add trace notify function */
117          for (i = 0; addobjnotify[i] != NULL; i++)
118                  ;
# Line 302 | Line 301 | main(int  argc, char  *argv[])
301                          case 'S':                       /* scotopic response */
302                                  if (argv[i][3])
303                                          goto badopt;
305                                sens_curve = scolor_scotopic;
304                                  out_scalefactor = WHTSCOTOPIC;
305 +                                sens_curve = scolor_scotopic;
306                                  break;
307                          case 'M':                       /* melanopic response */
308                                  if (argv[i][3])
309                                          goto badopt;
311                                sens_curve = scolor_melanopic;
310                                  out_scalefactor = WHTMELANOPIC;
311 +                                sens_curve = scolor_melanopic;
312                                  break;
313 +                        case 'A':                       /* radiometric average */
314 +                                if (argv[i][3])
315 +                                        goto badopt;
316 +                                out_scalefactor = 1;
317 +                                sens_curve = scolor_mean;
318 +                                break;
319                          default:
320                                  goto badopt;
321                          }
# Line 348 | Line 353 | main(int  argc, char  *argv[])
353          rval = setspectrsamp(CNDX, WLPART);
354          if (rval < 0)
355                  error(USER, "unsupported spectral sampling");
356 <        if (out_prims != NULL) {
356 >        if (sens_curve != NULL)
357 >                out_prims = NULL;
358 >        else if (out_prims != NULL) {
359                  if (!rval)
360                          error(WARNING, "spectral range incompatible with color output");
361          } else if (NCSAMP == 3)
# Line 358 | Line 365 | main(int  argc, char  *argv[])
365                                          /* initialize object types */
366          initotypes();
367                                          /* initialize urand */
368 <        if (rand_samp) {
362 <                srandom((long)time(0));
363 <                initurand(0);
364 <        } else {
365 <                srandom(0L);
366 <                initurand(2048);
367 <        }
368 >        reset_random();
369                                          /* set up signal handling */
370          sigdie(SIGINT, "Interrupt");
371   #ifdef SIGHUP

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)