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

Comparing ray/src/rt/rxpmain.cpp (file contents):
Revision 2.1 by greg, Wed Aug 14 20:05:23 2024 UTC vs.
Revision 2.8 by greg, Tue Apr 22 17:12:25 2025 UTC

# Line 13 | Line 13 | static const char      RCSid[] = "$Id$";
13   #include  "rtprocess.h" /* getpid() */
14   #include  "platform.h"
15   #include  "RpictSimulManager.h"
16 + #include  "func.h"
17  
18   extern char  *progname;                 /* argv[0] */
19   const char  *sigerr[NSIG];              /* signal error messages */
# Line 57 | Line 58 | static void printdefaults(void);
58                  "AdaptiveShadowTesting\nOutputs=v,l\n" \
59                  "OutputCS=RGB,XYZ,prims,spec\n"
60  
60
61   void
62 < quit(int code)                  /* quit program -- called from ray_done() */
62 > quit(int code)                  /* quit program */
63   {
64 <        if (ray_pnprocs < 0)
65 <                _exit(code);            /* avoid flush in child */
64 >        exit(code);             // don't bother about freeing anything
65 > }
66  
67 <        int     ec = myRPmanager.Cleanup();
68 <
69 <        if (ec) code = ec;
70 <
71 <        exit(code);
67 > /* Set default options */
68 > static void
69 > default_options(void)
70 > {
71 >        shadthresh = .05;
72 >        shadcert = .5;
73 >        srcsizerat = .25;
74 >        directrelay = 1;
75 >        ambacc = 0.2;
76 >        ambres = 64;
77 >        ambdiv = 512;
78 >        ambssamp = 128;
79 >        maxdepth = 7;
80   }
81  
74
82   int
83   main(int  argc, char  *argv[])
84   {
# Line 101 | Line 108 | main(int  argc, char  *argv[])
108          strcat(RFeatureList, RXPICT_FEATURES);
109          if (argc > 1 && !strcmp(argv[1], "-features"))
110                  return feature_status(argc-2, argv+2);
111 +                                        /* initialize calcomp routines */
112 +        initfunc();
113 +                                        /* set defaults */
114 +        default_options();
115                                          /* option city */
116          for (i = 1; i < argc; i++) {
117                                                  /* expand arguments */
# Line 499 | Line 510 | progReporter(double pct)
510          static time_t   lastReportTime = 0;
511          time_t          tnow = time(NULL);
512  
513 <        if (tnow - lastReportTime < ralrm)
513 >        if (pct < 100.-FTINY && tnow - lastReportTime < ralrm)
514                  return;                 // too soon, my Precious...
515  
516          sprintf(errmsg, "%7.3f%% done after %7.3f hours\n", pct, (tnow-tstart)/3600.);
# Line 513 | Line 524 | progReporter(double pct)
524   void
525   rpict(int seq, char *pout, char *zout, char *prvr)
526   /*
527 < * If seq is greater than zero, then we will render a sequence of
527 > * If seq is greater than zero, we will render a sequence of
528   * images based on view parameter strings read from the standard input.
529   * If pout is NULL, then all images will be sent to the standard ouput.
530   * If seq is greater than zero and prvr is an integer, then it is the
# Line 559 | Line 570 | rpict(int seq, char *pout, char *zout, char *prvr)
570                  if (!dtype)
571                          error(USER, "ResumeFrame() failed");
572                  if (!seq)
573 <                        return;         // all done if we're running a sequence
573 >                        return;         // all done if not a sequence
574          }
575          do {
576                  if (prvr)               // have view from sequence recovery?
# Line 611 | Line 622 | rpict(int seq, char *pout, char *zout, char *prvr)
622                                                          zout ? dbuf : zout)
623                                          && !seq | (errno != EEXIST))
624                          error(USER, "RenderFrame() failed");
625 <        } while (seq++);                // all done if we're running a sequence
625 >        } while (seq++);                // all done if not a sequence
626   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines