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

Comparing ray/src/rt/rview.c (file contents):
Revision 1.18 by greg, Tue Jun 25 14:06:15 1991 UTC vs.
Revision 2.3 by greg, Thu Dec 19 14:54:46 1991 UTC

# Line 35 | Line 35 | double  shadthresh = .1;               /* shadow threshold */
35   double  shadcert = .25;                 /* shadow certainty */
36   int  directrelay = 0;                   /* number of source relays */
37   int  vspretest = 128;                   /* virtual source pretest density */
38 + int  directinvis = 0;                   /* sources invisible? */
39 + double  srcsizerat = 0.;                /* maximum ratio source size/dist. */
40  
41   int  maxdepth = 4;                      /* maximum recursion depth */
42   double  minweight = 1e-2;               /* minimum ray weight */
# Line 61 | Line 63 | int  pdepth;                           /* image depth in current frame */
63  
64   static char  *reserve_mem = NULL;       /* pre-allocated reserve memory */
65  
66 < #define RESERVE_AMT     8192            /* amount of memory to reserve */
66 > #define RESERVE_AMT     32768           /* amount of memory to reserve */
67  
68   #define  CTRL(c)        ('c'-'@')
69  
# Line 168 | Line 170 | command(prompt)                        /* get/execute command */
170   char  *prompt;
171   {
172   #define  badcom(s)      strncmp(s, inpbuf, args-inpbuf-1)
171        double  atof();
173          char  inpbuf[256];
174          char  *args;
175   again:
# Line 221 | Line 222 | again:
222                  break;
223          case 'm':                               /* move camera */
224                  if (badcom("move"))
225 + #ifdef  MSTATS
226 +                {
227 +                        if (badcom("memory"))
228 +                                goto commerr;
229 +                        printmemstats(stderr);
230 +                        break;
231 +                }
232 + #else
233                          goto commerr;
234 + #endif
235                  getmove(args);
236                  break;
237          case 'r':                               /* rotate/repaint */
# Line 315 | Line 325 | rsample()                      /* sample the image */
325                                                  /* sample the image */
326          for (y = 0; /* y < ysiz */ ; y++) {
327                  for (x = 0; x < xsiz-1; x++) {
328 <                        if (dev->inpready)
328 >                        if (dev->inpready || errno == ENOMEM)
329                                  goto escape;
330                          /*
331                           * Test super-pixel to the right.
# Line 331 | Line 341 | rsample()                      /* sample the image */
341                  if (y >= ysiz-1)
342                          break;
343                  for (x = 0; x < xsiz; x++) {
344 <                        if (dev->inpready)
344 >                        if (dev->inpready || errno == ENOMEM)
345                                  goto escape;
346                          /*
347                           * Find super-pixel at this position in next row.
# Line 386 | Line 396 | int  pd;
396          if (p->kid == NULL) {                   /* subdivide */
397  
398                  if ((p->kid = newptree()) == NULL)
399 <                        return(growth);
399 >                        return(0);
400                  /*
401                   *  The following paint order can leave a black pixel
402                   *  when redraw() is called in (*dev->paintr)().

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines