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

Comparing ray/src/rt/rv3.c (file contents):
Revision 1.12 by greg, Fri Jan 19 00:00:31 1990 UTC vs.
Revision 1.13 by greg, Thu Feb 22 11:46:15 1990 UTC

# Line 18 | Line 18 | static char SCCSid[] = "$SunId$ LBL";
18  
19   #include  "random.h"
20  
21 + #ifndef WFLUSH
22 + #define WFLUSH          30              /* flush after this many rays */
23 + #endif
24  
25 +
26   getrect(s, r)                           /* get a box */
27   char  *s;
28   register RECT  *r;
# Line 130 | Line 134 | paint(p, xmin, ymin, xmax, ymax)       /* compute and paint
134   register PNODE  *p;
135   int  xmin, ymin, xmax, ymax;
136   {
137 +        extern long  nrays;
138 +        static long  lastflush = 0;
139          static RAY  thisray;
140          double  h, v;
141          register int  i;
# Line 157 | Line 163 | int  xmin, ymin, xmax, ymax;
163          scalecolor(p->v, exposure);
164  
165          (*dev->paintr)(greyscale?greyof(p->v):p->v, xmin, ymin, xmax, ymax);
166 +
167 +        if (dev->flush != NULL && nrays - lastflush >= WFLUSH) {
168 +                lastflush = nrays;
169 +                (*dev->flush)();
170 +        }
171   }
172  
173  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines