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.28 by greg, Wed Nov 15 18:02:53 2023 UTC vs.
Revision 2.35 by greg, Wed Oct 30 16:47:03 2024 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 61 | Line 60 | static void printdefaults(void);
60                                          /* rpict additional features */
61   #ifdef PERSIST
62   #define RPICT_FEATURES  "Persist\nParallelPersist\n" \
63 <                "Hyperspectral\nParticipatingMedia=Mist\n" \
63 >                "ParticipatingMedia=Mist\n" \
64                  "Recovery\nIrradianceCalc\nViewTypes=v,l,a,h,s,c\n" \
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 <                "Hyperspectral\nParticipatingMedia=Mist\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 244 | Line 245 | main(int  argc, char  *argv[])
245                          check(2,"i");
246                          ralrm = atoi(argv[++i]);
247                          break;
247 #if MAXCSAMP>3
248                case 'c':                               /* spectral sampling */
249                        switch (argv[i][2]) {
250                        case 's':                       /* spectral bin count */
251                                check(3,"i");
252                                NCSAMP = atoi(argv[++i]);
253                                break;
254                        case 'w':                       /* wavelength extrema */
255                                check(3,"ff");
256                                WLPART[0] = atof(argv[++i]);
257                                WLPART[3] = atof(argv[++i]);
258                                break;
259 #if 0
260                        case 'o':                       /* output spectral results */
261                                rval = (out_prims == NULL);
262                                check_bool(3,rval);
263                                if (rval) out_prims = NULL;
264                                else if (out_prims == NULL) out_prims = stdprims;
265                                break;
266 #endif
267                        default:
268                                goto badopt;
269                        }
270                        break;
271 #endif
248   #ifdef  PERSIST
249                  case 'P':                               /* persist file */
250                          if (argv[i][2] == 'P') {
# Line 295 | 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 386 | Line 366 | main(int  argc, char  *argv[])
366                          close(duped1);
367                  }
368                  if (persist == PARALLEL) {      /* multiprocessing */
369 <                        preload_objs();         /* preload scene */
390 <                        shm_boundary = (char *)malloc(16);
391 <                        strcpy(shm_boundary, "SHM_BOUNDARY");
369 >                        cow_memshare();         /* preloads scene */
370                          while ((rval=fork()) == 0) {    /* keep on forkin' */
371                                  pflock(1);
372                                  pfhold();
# Line 454 | 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   }
# Line 538 | Line 518 | printdefaults(void)                    /* print default values to stdou
518          printf("-vl %f\t\t\t# view lift\n", ourview.voff);
519          printf("-x  %-9d\t\t\t# x resolution\n", hresolu);
520          printf("-y  %-9d\t\t\t# y resolution\n", vresolu);
541        if (NCSAMP > 3) {
542                printf("-cs %-2d\t\t\t\t# number of spectral bins\n", NCSAMP);
543                printf("-cw %3.0f %3.0f\t\t\t# wavelength limits (nm)\n",
544                                WLPART[3], WLPART[0]);
545 /*              printf(out_prims != NULL ? "-co-\t\t\t\t# output tristimulus colors\n" :
546                                "-co+\t\t\t\t# output spectral values\n");
547 */      }
521          if (out_prims == stdprims)
522                  printf("-pRGB\t\t\t\t# standard RGB color output\n");
523          else if (out_prims == xyzprims)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines