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

Comparing ray/src/rt/rcmain.c (file contents):
Revision 2.1 by greg, Sat Jun 9 07:16:47 2012 UTC vs.
Revision 2.6 by greg, Fri Jun 22 21:58:45 2012 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include <signal.h>
11   #include "rcontrib.h"
12 < #include "platform.h"
13 < #include "paths.h"
12 > #include "random.h"
13   #include "source.h"
14   #include "ambient.h"
15  
17 char    *shm_boundary = NULL;           /* boundary of shared memory */
18
16   int     gargc;                          /* global argc */
17   char    **gargv;                        /* global argv */
18   char    *octname;                       /* global octree name */
# Line 46 | Line 43 | int    lim_dist = 0;                   /* limit distance? */
43   const char      *modname[MAXMODLIST];   /* ordered modifier name list */
44   int             nmods = 0;              /* number of modifiers */
45  
46 + void    (*addobjnotify[8])() = {ambnotify, NULL};
47 +
48   char    RCCONTEXT[] = "RCONTRIB";       /* our special evaluation context */
49  
51 void    (*addobjnotify[8])() = {ambnotify, tranotify, NULL};
50  
53
51   static void
52   printdefaults(void)                     /* print default values to stdout */
53   {
54          char  *cp;
55  
56 +        printf("-c %-5d\t\t\t# accumulated rays per record\n", accumulate);
57 +        printf("-V%c\t\t\t\t# output %s\n", contrib ? '+' : '-',
58 +                        contrib ? "contributions" : "coefficients");
59          if (imm_irrad)
60                  printf("-I+\t\t\t\t# immediate irradiance on\n");
61          printf("-n %-2d\t\t\t\t# number of rendering processes\n", nproc);
# Line 227 | Line 227 | main(int argc, char *argv[])
227                          yres = atoi(argv[++i]);
228                          break;
229                  case 'w':                       /* warnings */
230 <                        rval = erract[WARNING].pf != NULL;
230 >                        rval = (erract[WARNING].pf != NULL);
231                          bool(2,rval);
232                          if (rval) erract[WARNING].pf = wputs;
233                          else erract[WARNING].pf = NULL;
# Line 339 | Line 339 | main(int argc, char *argv[])
339  
340          setambient();                   /* initialize ambient calculation */
341  
342 <        if (nproc > 1) {
343 <                preload_objs();         /* preload auxiliary data */
344 <                                        /* set shared memory boundary */
345 <                shm_boundary = strcpy((char *)malloc(16), "SHM_BOUNDARY");
346 <        }
347 <        rcontrib();                     /* trace ray contributions */
342 >        rcontrib();                     /* trace ray contributions (loop) */
343  
344          ambsync();                      /* flush ambient file */
345  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines