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.40 by greg, Thu Jun 5 18:26:46 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 27 | Line 28 | static const char      RCSid[] = "$Id$";
28   #define  PCHILD         3               /* child of normal persist */
29   #endif
30  
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  
36 extern time_t  time();
35   extern time_t  tstart;                  /* start time */
36  
37   extern int  ralrm;                      /* seconds between reports */
# Line 67 | Line 65 | static void printdefaults(void);
65                  "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
66                  "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
67                  "AdaptiveShadowTesting\nOutputs=v,l\n" \
68 <                "OutputCS=RGB,XYZ,Y,S,M,prims\n"
68 >                "OutputCS=RGB,XYZ,prims\n"
69   #else
70   #define RPICT_FEATURES  "Recovery\nIrradianceCalc\nViewTypes=v,l,a,h,s,c\n" \
71                  "ParticipatingMedia=Mist\n" \
# Line 75 | Line 73 | static void printdefaults(void);
73                  "PixelJitter\nPixelSampling\nPixelMotion\nPixelDepthOfField\n" \
74                  "SmallSourceDrawing\nViewSequence\nProgressReporting\n" \
75                  "AdaptiveShadowTesting\nOutputs=v,l\n" \
76 <                "OutputCS=RGB,XYZ,Y,S,M,prims\n"
76 >                "OutputCS=RGB,XYZ,prims\n"
77   #endif
78  
79  
# Line 110 | Line 108 | main(int  argc, char  *argv[])
108          strcat(RFeatureList, RPICT_FEATURES);
109          if (argc > 1 && !strcmp(argv[1], "-features"))
110                  return feature_status(argc-2, argv+2);
111 +                                        /* initialize calcomp routines */
112 +        initfunc();
113                                          /* option city */
114          for (i = 1; i < argc; i++) {
115                                                  /* expand arguments */
# Line 242 | Line 242 | main(int  argc, char  *argv[])
242                                  check(2,"s");
243                          recover = argv[++i];
244                          break;
245                case 't':                               /* timer */
246                        check(2,"i");
247                        ralrm = atoi(argv[++i]);
248                        break;
245   #ifdef  PERSIST
246                  case 'P':                               /* persist file */
247                          if (argv[i][2] == 'P') {
# Line 258 | Line 254 | main(int  argc, char  *argv[])
254                          persistfile(argv[++i]);
255                          break;
256   #endif
257 +                case 't':                               /* timer */
258 +                        check(2,"i");
259 +                        ralrm = atoi(argv[++i]);
260 +                        break;
261                  case 'w':                               /* warnings */
262                          rval = erract[WARNING].pf != NULL;
263                          check_bool(2,rval);
# Line 355 | Line 355 | main(int  argc, char  *argv[])
355          ray_init_pmap();     /* PMAP: set up & load photon maps */
356  
357          marksources();                  /* find and mark sources */
358
358          setambient();                   /* initialize ambient calculation */
359          
360          fflush(stdout);                 /* in case we're duplicating header */
# Line 367 | Line 366 | main(int  argc, char  *argv[])
366                          close(duped1);
367                  }
368                  if (persist == PARALLEL) {      /* multiprocessing */
369 <                        preload_objs();         /* preload scene */
371 <                        shm_boundary = (char *)malloc(16);
372 <                        strcpy(shm_boundary, "SHM_BOUNDARY");
369 >                        cow_memshare();         /* preloads scene */
370                          while ((rval=fork()) == 0) {    /* keep on forkin' */
371                                  pflock(1);
372                                  pfhold();
# Line 435 | Line 432 | wputs(                         /* warning output function */
432   )
433   {
434          int  lasterrno = errno;
435 +        if (erract[WARNING].pf == NULL)
436 +                return;         /* called by calcomp or someone */
437          eputs(s);
438          errno = lasterrno;
439   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines