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

Comparing ray/src/rt/rpmain.c (file contents):
Revision 2.30 by greg, Wed Jan 17 01:31:08 2024 UTC vs.
Revision 2.38 by greg, Tue Apr 22 17:12:25 2025 UTC

# Line 13 | Line 13 | static const char      RCSid[] = "$Id$";
13   #include  "platform.h"
14   #include  "rtprocess.h" /* getpid() */
15   #include  "ray.h"
16 + #include  "func.h"
17   #include  "source.h"
18   #include  "ambient.h"
19   #include  "random.h"
# Line 30 | Line 31 | static const char      RCSid[] = "$Id$";
31   char  *progname;                        /* argv[0] */
32   char  *octname;                         /* octree name */
33   char  *sigerr[NSIG];                    /* signal error messages */
33 char  *shm_boundary = NULL;             /* boundary of shared memory */
34   char  *errfile = NULL;                  /* error output file */
35  
36   extern time_t  time();
# Line 66 | Line 66 | static void printdefaults(void);
66                  "HessianAmbientCache\nAmbientAveraging\nAmbientValueSharing\n" \
67                  "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
68                  "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
69 <                "AdaptiveShadowTesting\nOutputs=v,l\n"
69 >                "AdaptiveShadowTesting\nOutputs=v,l\n" \
70 >                "OutputCS=RGB,XYZ,prims\n"
71   #else
72   #define RPICT_FEATURES  "Recovery\nIrradianceCalc\nViewTypes=v,l,a,h,s,c\n" \
73                  "ParticipatingMedia=Mist\n" \
74                  "HessianAmbientCache\nAmbientAveraging\nAmbientValueSharing\n" \
75                  "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
76                  "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
77 <                "AdaptiveShadowTesting\nOutputs=v,l\n"
77 >                "AdaptiveShadowTesting\nOutputs=v,l\n" \
78 >                "OutputCS=RGB,XYZ,prims\n"
79   #endif
80  
81  
# Line 108 | Line 110 | main(int  argc, char  *argv[])
110          strcat(RFeatureList, RPICT_FEATURES);
111          if (argc > 1 && !strcmp(argv[1], "-features"))
112                  return feature_status(argc-2, argv+2);
113 +                                        /* initialize calcomp routines */
114 +        initfunc();
115                                          /* option city */
116          for (i = 1; i < argc; i++) {
117                                                  /* expand arguments */
# Line 240 | Line 244 | main(int  argc, char  *argv[])
244                                  check(2,"s");
245                          recover = argv[++i];
246                          break;
243                case 't':                               /* timer */
244                        check(2,"i");
245                        ralrm = atoi(argv[++i]);
246                        break;
247   #ifdef  PERSIST
248                  case 'P':                               /* persist file */
249                          if (argv[i][2] == 'P') {
# Line 256 | Line 256 | main(int  argc, char  *argv[])
256                          persistfile(argv[++i]);
257                          break;
258   #endif
259 +                case 't':                               /* timer */
260 +                        check(2,"i");
261 +                        ralrm = atoi(argv[++i]);
262 +                        break;
263                  case 'w':                               /* warnings */
264                          rval = erract[WARNING].pf != NULL;
265                          check_bool(2,rval);
# Line 271 | Line 275 | main(int  argc, char  *argv[])
275                  }
276          }
277                                          /* set/check spectral sampling */
278 <        rval = setspectrsamp(CNDX, WLPART);
275 <        if (rval < 0)
278 >        if (setspectrsamp(CNDX, WLPART) <= 0)
279                  error(USER, "unsupported spectral sampling");
280  
281          err = setview(&ourview);        /* set viewing parameters */
# Line 354 | Line 357 | main(int  argc, char  *argv[])
357          ray_init_pmap();     /* PMAP: set up & load photon maps */
358  
359          marksources();                  /* find and mark sources */
357
360          setambient();                   /* initialize ambient calculation */
361          
362          fflush(stdout);                 /* in case we're duplicating header */
# Line 366 | Line 368 | main(int  argc, char  *argv[])
368                          close(duped1);
369                  }
370                  if (persist == PARALLEL) {      /* multiprocessing */
371 <                        preload_objs();         /* preload scene */
370 <                        shm_boundary = (char *)malloc(16);
371 <                        strcpy(shm_boundary, "SHM_BOUNDARY");
371 >                        cow_memshare();         /* preloads scene */
372                          while ((rval=fork()) == 0) {    /* keep on forkin' */
373                                  pflock(1);
374                                  pfhold();
# Line 434 | Line 434 | wputs(                         /* warning output function */
434   )
435   {
436          int  lasterrno = errno;
437 +        if (erract[WARNING].pf == NULL)
438 +                return;         /* called by calcomp or someone */
439          eputs(s);
440          errno = lasterrno;
441   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines