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.29 by greg, Fri Nov 17 20:02:07 2023 UTC vs.
Revision 2.37 by greg, Sat Jan 18 03:49:00 2025 UTC

# Line 30 | Line 30 | static const char      RCSid[] = "$Id$";
30   char  *progname;                        /* argv[0] */
31   char  *octname;                         /* octree name */
32   char  *sigerr[NSIG];                    /* signal error messages */
33 char  *shm_boundary = NULL;             /* boundary of shared memory */
33   char  *errfile = NULL;                  /* error output file */
34  
35   extern time_t  time();
# Line 66 | Line 65 | static void printdefaults(void);
65                  "HessianAmbientCache\nAmbientAveraging\nAmbientValueSharing\n" \
66                  "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
67                  "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
68 <                "AdaptiveShadowTesting\nOutputs=v,l\n"
68 >                "AdaptiveShadowTesting\nOutputs=v,l\n" \
69 >                "OutputCS=RGB,XYZ,prims\n"
70   #else
71   #define RPICT_FEATURES  "Recovery\nIrradianceCalc\nViewTypes=v,l,a,h,s,c\n" \
72                  "ParticipatingMedia=Mist\n" \
73                  "HessianAmbientCache\nAmbientAveraging\nAmbientValueSharing\n" \
74                  "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
75                  "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
76 <                "AdaptiveShadowTesting\nOutputs=v,l\n"
76 >                "AdaptiveShadowTesting\nOutputs=v,l\n" \
77 >                "OutputCS=RGB,XYZ,prims\n"
78   #endif
79  
80  
# Line 240 | Line 241 | main(int  argc, char  *argv[])
241                                  check(2,"s");
242                          recover = argv[++i];
243                          break;
243                case 't':                               /* timer */
244                        check(2,"i");
245                        ralrm = atoi(argv[++i]);
246                        break;
244   #ifdef  PERSIST
245                  case 'P':                               /* persist file */
246                          if (argv[i][2] == 'P') {
# Line 256 | Line 253 | main(int  argc, char  *argv[])
253                          persistfile(argv[++i]);
254                          break;
255   #endif
256 +                case 't':                               /* timer */
257 +                        check(2,"i");
258 +                        ralrm = atoi(argv[++i]);
259 +                        break;
260                  case 'w':                               /* warnings */
261                          rval = erract[WARNING].pf != NULL;
262                          check_bool(2,rval);
# Line 270 | Line 271 | main(int  argc, char  *argv[])
271                          goto badopt;
272                  }
273          }
274 +                                        /* set/check spectral sampling */
275 +        if (setspectrsamp(CNDX, WLPART) <= 0)
276 +                error(USER, "unsupported spectral sampling");
277 +
278          err = setview(&ourview);        /* set viewing parameters */
279          if (err != NULL)
280                  error(USER, err);
# Line 349 | Line 354 | main(int  argc, char  *argv[])
354          ray_init_pmap();     /* PMAP: set up & load photon maps */
355  
356          marksources();                  /* find and mark sources */
352
357          setambient();                   /* initialize ambient calculation */
358          
359          fflush(stdout);                 /* in case we're duplicating header */
# Line 361 | Line 365 | main(int  argc, char  *argv[])
365                          close(duped1);
366                  }
367                  if (persist == PARALLEL) {      /* multiprocessing */
368 <                        preload_objs();         /* preload scene */
365 <                        shm_boundary = (char *)malloc(16);
366 <                        strcpy(shm_boundary, "SHM_BOUNDARY");
368 >                        cow_memshare();         /* preloads scene */
369                          while ((rval=fork()) == 0) {    /* keep on forkin' */
370                                  pflock(1);
371                                  pfhold();
# Line 429 | Line 431 | wputs(                         /* warning output function */
431   )
432   {
433          int  lasterrno = errno;
434 +        if (erract[WARNING].pf == NULL)
435 +                return;         /* called by calcomp or someone */
436          eputs(s);
437          errno = lasterrno;
438   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines