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

Comparing ray/src/rt/x10.c (file contents):
Revision 1.24 by greg, Wed Feb 21 18:17:56 1990 UTC vs.
Revision 1.25 by greg, Thu Feb 22 11:46:20 1990 UTC

# Line 36 | Line 36 | static char SCCSid[] = "$SunId$ LBL";
36   #define COMCW           8               /* approx. character width (pixels) */
37   #define COMCH           13              /* approx. character height (pixels) */
38  
39 #ifndef WFLUSH
40 #define WFLUSH          30              /* flush after this many rays */
41 #endif
42
43 #define  checkinp()     while (XPending() > 0) getevent()
44
39   #define  levptr(etype)  ((etype *)&thisevent)
40  
41   static XEvent  thisevent;               /* current event */
# Line 68 | Line 62 | extern char  *malloc(), *getcombuf();
62   extern char  *progname;
63  
64   int  x_close(), x_clear(), x_paintr(), x_errout(),
65 <                x_getcur(), x_comout(), x_comin();
65 >                x_getcur(), x_comout(), x_comin(), x_flush();
66  
67   static struct driver  x_driver = {
68          x_close, x_clear, x_paintr, x_getcur,
69 <        x_comout, x_comin, 1.0
69 >        x_comout, x_comin, x_flush, 1.0
70   };
71  
72  
# Line 181 | Line 175 | x_paintr(col, xmin, ymin, xmax, ymax)          /* fill a recta
175   COLOR  col;
176   int  xmin, ymin, xmax, ymax;
177   {
184        extern long  nrays;             /* global ray count */
178          extern int  xnewcolr();         /* pixel assignment routine */
186        static long  lastflush = 0;     /* ray count at last flush */
179  
180          if (ncolors > 0) {
181                  XPixSet(gwind, xmin, gheight-ymax, xmax-xmin, ymax-ymin,
182                                  pixval[get_pixel(col, xnewcolr)]);
183          }
184 <        if (nrays - lastflush >= WFLUSH) {
185 <                if (ncolors <= 0)       /* output necessary for death */
186 <                        XPixSet(gwind,0,0,1,1,BlackPixel);
187 <                checkinp();
188 <                lastflush = nrays;
189 <        }
184 > }
185 >
186 >
187 > static
188 > x_flush()                       /* flush output */
189 > {
190 >        if (ncolors <= 0)       /* output necessary for death */
191 >                XPixSet(gwind,0,0,1,1,BlackPixel);
192 >        while (XPending() > 0)
193 >                getevent();
194 >
195   }
196  
197  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines