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.32 by greg, Fri Apr 5 16:41:17 2024 UTC vs.
Revision 2.39 by greg, Wed Apr 23 01:57:04 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();
36   extern time_t  tstart;                  /* start time */
37  
38   extern int  ralrm;                      /* seconds between reports */
# Line 67 | Line 66 | static void printdefaults(void);
66                  "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
67                  "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
68                  "AdaptiveShadowTesting\nOutputs=v,l\n" \
69 <                "OutputCS=RGB,XYZ,Y,S,M,prims\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" \
# Line 75 | Line 74 | static void printdefaults(void);
74                  "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
75                  "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
76                  "AdaptiveShadowTesting\nOutputs=v,l\n" \
77 <                "OutputCS=RGB,XYZ,Y,S,M,prims\n"
77 >                "OutputCS=RGB,XYZ,prims\n"
78   #endif
79  
80  
# Line 110 | Line 109 | main(int  argc, char  *argv[])
109          strcat(RFeatureList, RPICT_FEATURES);
110          if (argc > 1 && !strcmp(argv[1], "-features"))
111                  return feature_status(argc-2, argv+2);
112 +                                        /* initialize calcomp routines */
113 +        initfunc();
114                                          /* option city */
115          for (i = 1; i < argc; i++) {
116                                                  /* expand arguments */
# Line 242 | Line 243 | main(int  argc, char  *argv[])
243                                  check(2,"s");
244                          recover = argv[++i];
245                          break;
245                case 't':                               /* timer */
246                        check(2,"i");
247                        ralrm = atoi(argv[++i]);
248                        break;
246   #ifdef  PERSIST
247                  case 'P':                               /* persist file */
248                          if (argv[i][2] == 'P') {
# Line 258 | Line 255 | main(int  argc, char  *argv[])
255                          persistfile(argv[++i]);
256                          break;
257   #endif
258 +                case 't':                               /* timer */
259 +                        check(2,"i");
260 +                        ralrm = atoi(argv[++i]);
261 +                        break;
262                  case 'w':                               /* warnings */
263                          rval = erract[WARNING].pf != NULL;
264                          check_bool(2,rval);
# Line 355 | Line 356 | main(int  argc, char  *argv[])
356          ray_init_pmap();     /* PMAP: set up & load photon maps */
357  
358          marksources();                  /* find and mark sources */
358
359          setambient();                   /* initialize ambient calculation */
360          
361          fflush(stdout);                 /* in case we're duplicating header */
# Line 367 | Line 367 | main(int  argc, char  *argv[])
367                          close(duped1);
368                  }
369                  if (persist == PARALLEL) {      /* multiprocessing */
370 <                        preload_objs();         /* preload scene */
371 <                        shm_boundary = (char *)malloc(16);
372 <                        strcpy(shm_boundary, "SHM_BOUNDARY");
370 >                        cow_memshare();         /* preloads scene */
371                          while ((rval=fork()) == 0) {    /* keep on forkin' */
372                                  pflock(1);
373                                  pfhold();
# Line 435 | Line 433 | wputs(                         /* warning output function */
433   )
434   {
435          int  lasterrno = errno;
436 +        if (erract[WARNING].pf == NULL)
437 +                return;         /* called by calcomp or someone */
438          eputs(s);
439          errno = lasterrno;
440   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines