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

Comparing ray/src/rt/rtmain.c (file contents):
Revision 2.20 by greg, Sun Dec 13 19:39:51 2009 UTC vs.
Revision 2.23 by greg, Tue Feb 24 19:39:27 2015 UTC

# Line 17 | Line 17 | static const char      RCSid[] = "$Id$";
17   #include  "ambient.h"
18   #include  "random.h"
19   #include  "paths.h"
20 + #include  "pmapray.h"
21  
22   extern char     *progname;              /* global argv[0] */
23  
# Line 77 | Line 78 | main(int  argc, char  *argv[])
78                                  default: goto badopt; }
79          int  persist = 0;
80          char  *octnm = NULL;
81 <        char  **tralp;
82 <        int  duped1;
81 >        char  **tralp = NULL;
82 >        int  duped1 = -1;
83          int  rval;
84          int  i;
85                                          /* global program name */
# Line 252 | Line 253 | main(int  argc, char  *argv[])
253          if (nproc > 1) {
254                  if (persist)
255                          error(USER, "multiprocessing incompatible with persist file");
256 <                if (hresolu > 0 && hresolu < nproc)
256 >                if (!vresolu && hresolu > 0 && hresolu < nproc)
257                          error(WARNING, "number of cores should not exceed horizontal resolution");
258                  if (trace != NULL)
259                          error(WARNING, "multiprocessing does not work properly with trace mode");
# Line 324 | Line 325 | main(int  argc, char  *argv[])
325                  fputformat(formstr(outform), stdout);
326                  putchar('\n');
327          }
328 <
328 >        
329 >        ray_init_pmap();     /* PMAP: set up & load photon maps */
330 >        
331          marksources();                  /* find and mark sources */
332  
333          setambient();                   /* initialize ambient calculation */
334 <
334 >        
335   #ifdef  PERSIST
336          if (persist) {
337                  fflush(stdout);
# Line 374 | Line 377 | runagain:
377                  goto runagain;
378          }
379   #endif
380 +
381 +        ray_done_pmap();           /* PMAP: free photon maps */
382 +        
383          quit(0);
384  
385   badopt:
# Line 459 | Line 465 | printdefaults(void)                    /* print default values to stdou
465          if (imm_irrad)
466                  printf("-I+\t\t\t\t# immediate irradiance on\n");
467          printf("-n %-2d\t\t\t\t# number of rendering processes\n", nproc);
468 <        printf("-x %-9d\t\t\t# x resolution (flush interval)\n", hresolu);
468 >        printf("-x %-9d\t\t\t# %s\n", hresolu,
469 >                        vresolu && hresolu ? "x resolution" : "flush interval");
470          printf("-y %-9d\t\t\t# y resolution\n", vresolu);
471          printf(lim_dist ? "-ld+\t\t\t\t# limit distance on\n" :
472                          "-ld-\t\t\t\t# limit distance off\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines