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.10 by greg, Wed Aug 7 05:10:09 2013 UTC

# Line 8 | Line 8 | static const char      RCSid[] = "$Id$";
8   #include "copyright.h"
9  
10   #include <signal.h>
11 + #include <time.h>
12   #include "rcontrib.h"
13 < #include "platform.h"
13 < #include "paths.h"
13 > #include "random.h"
14   #include "source.h"
15   #include "ambient.h"
16  
17 char    *shm_boundary = NULL;           /* boundary of shared memory */
18
17   int     gargc;                          /* global argc */
18   char    **gargv;                        /* global argv */
19   char    *octname;                       /* global octree name */
# Line 46 | Line 44 | int    lim_dist = 0;                   /* limit distance? */
44   const char      *modname[MAXMODLIST];   /* ordered modifier name list */
45   int             nmods = 0;              /* number of modifiers */
46  
47 < char    RCCONTEXT[] = "RCONTRIB";       /* our special evaluation context */
47 > void    (*addobjnotify[8])() = {ambnotify, NULL};
48  
49 < void    (*addobjnotify[8])() = {ambnotify, tranotify, NULL};
49 > char    RCCONTEXT[] = "RC";             /* our special evaluation context */
50  
51  
52   static void
53   printdefaults(void)                     /* print default values to stdout */
54   {
55 <        char  *cp;
56 <
55 >        printf("-c %-5d\t\t\t# accumulated rays per record\n", accumulate);
56 >        printf("-V%c\t\t\t\t# output %s\n", contrib ? '+' : '-',
57 >                        contrib ? "contributions" : "coefficients");
58          if (imm_irrad)
59                  printf("-I+\t\t\t\t# immediate irradiance on\n");
60          printf("-n %-2d\t\t\t\t# number of rendering processes\n", nproc);
# Line 169 | Line 168 | main(int argc, char *argv[])
168                                  case 'n': case 'N': case 'f': case 'F': \
169                                  case '-': case '0': var = 0; break; \
170                                  default: goto badopt; }
172        int     nprocs = 1;
171          char    *curout = NULL;
172          char    *binval = NULL;
173          int     bincnt = 0;
# Line 227 | Line 225 | main(int argc, char *argv[])
225                          yres = atoi(argv[++i]);
226                          break;
227                  case 'w':                       /* warnings */
228 <                        rval = erract[WARNING].pf != NULL;
228 >                        rval = (erract[WARNING].pf != NULL);
229                          bool(2,rval);
230                          if (rval) erract[WARNING].pf = wputs;
231                          else erract[WARNING].pf = NULL;
# Line 339 | Line 337 | main(int argc, char *argv[])
337  
338          setambient();                   /* initialize ambient calculation */
339  
340 <        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 */
340 >        rcontrib();                     /* trace ray contributions (loop) */
341  
342          ambsync();                      /* flush ambient file */
343  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines