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 2.30 by greg, Tue Sep 16 21:14:11 2008 UTC vs.
Revision 2.34 by greg, Sat Oct 9 22:38:35 2010 UTC

# Line 29 | Line 29 | static const char      RCSid[] = "$Id$";
29   #define  sscanvec(s,v)  (sscanf(s,"%lf %lf %lf",v,v+1,v+2)==3)
30   #endif
31  
32 < static unsigned long  niflush;          /* flushes since newimage() */
32 > static RNUMBER  niflush;                /* flushes since newimage() */
33  
34   int
35   getrect(                                /* get a box */
# Line 197 | Line 197 | paint(                 /* compute and paint a rectangle */
197          } else {                                /* queuing mode */
198                  int     rval;
199                  rayorigin(&thisray, PRIMARY, NULL, NULL);
200 <                thisray.rno = (unsigned long)p;
200 >                thisray.rno = (RNUMBER)p;
201                  rval = ray_pqueue(&thisray);
202                  if (!rval)
203                          return(0);
204                  if (rval < 0)
205                          return(-1);
206 +                                                /* get node for returned ray */
207                  p = (PNODE *)thisray.rno;
208          }
209  
# Line 212 | Line 213 | paint(                 /* compute and paint a rectangle */
213          recolor(p);                             /* paint it */
214  
215          if (dev->flush != NULL) {               /* shall we check for input? */
216 <                static unsigned long    lastflush = 0;
217 <                unsigned long           counter = raynum;
218 <                int                     flushintvl;
216 >                static RNUMBER  lastflush = 0;
217 >                RNUMBER         counter = raynum;
218 >                int             flushintvl;
219                  if (nproc == 1) {
220                          counter = nrays;
221                          flushintvl = WFLUSH1;
# Line 224 | Line 225 | paint(                 /* compute and paint a rectangle */
225                          flushintvl = nproc*niflush/(ambounce+1);
226                  else
227                          flushintvl = nproc*WFLUSH/(ambounce+1);
228 +                if (lastflush > counter)
229 +                        lastflush = 0;          /* counter wrapped */
230  
231                  if (counter - lastflush >= flushintvl) {
232                          lastflush = counter;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines