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

Comparing ray/src/hd/rhd_x11.c (file contents):
Revision 3.45 by greg, Thu Apr 28 16:28:20 2016 UTC vs.
Revision 3.47 by greg, Fri Feb 12 00:53:56 2021 UTC

# Line 25 | Line 25 | static const char      RCSid[] = "$Id$";
25   #define RAYQLEN         50000           /* max. rays to queue before flush */
26   #endif
27  
28 #ifndef FEQ
29 #define FEQ(a,b)        ((a)-(b) <= FTINY && (a)-(b) >= -FTINY)
30 #endif
31
28   #define GAMMA           2.2             /* default gamma correction */
29  
30   #define FRAMESTATE(s)   (((s)&(ShiftMask|ControlMask))==(ShiftMask|ControlMask))
# Line 116 | Line 112 | mytmflags(void)                        /* figure out tone mapping flags */
112   }
113  
114  
115 < extern void
115 > void
116   dev_open(                       /* initialize X11 driver */
117          char  *id
118   )
# Line 217 | Line 213 | dev_open(                      /* initialize X11 driver */
213   }
214  
215  
216 < extern void
216 > void
217   dev_close(void)                 /* close our display */
218   {
219          freepixels();
# Line 235 | Line 231 | dev_close(void)                        /* close our display */
231   }
232  
233  
234 < extern void
234 > void
235   dev_clear(void)                 /* clear our quadtree */
236   {
237          qtCompost(100);
# Line 245 | Line 241 | dev_clear(void)                        /* clear our quadtree */
241   }
242  
243  
244 < extern int
244 > int
245   dev_view(                       /* assign new driver view */
246          VIEW    *nv
247   )
# Line 264 | Line 260 | dev_view(                      /* assign new driver view */
260                  return(0);
261          }
262          if (nv != &odev.v) {
263 <                if (!FEQ(nv->horiz,odev.v.horiz) ||     /* resize window? */
264 <                                !FEQ(nv->vert,odev.v.vert)) {
263 >                if (!FABSEQ(nv->horiz,odev.v.horiz) ||  /* resize window? */
264 >                                !FABSEQ(nv->vert,odev.v.vert)) {
265                          int     dw = DisplayWidth(ourdisplay,ourscreen);
266                          int     dh = DisplayHeight(ourdisplay,ourscreen);
267  
# Line 293 | Line 289 | dev_view(                      /* assign new driver view */
289   }
290  
291  
292 < extern void
292 > void
293   dev_section(            /* add octree for geometry rendering */
294          char    *gfn,
295          char    *pfn
# Line 303 | Line 299 | dev_section(           /* add octree for geometry rendering */
299   }
300  
301  
302 < extern void
302 > void
303   dev_auxcom(             /* process an auxiliary command */
304          char    *cmd,
305          char    *args
# Line 314 | Line 310 | dev_auxcom(            /* process an auxiliary command */
310   }
311  
312  
313 < extern VIEW *
313 > VIEW *
314   dev_auxview(            /* return nth auxiliary view */
315          int     n,
316          int     hvres[2]
# Line 327 | Line 323 | dev_auxview(           /* return nth auxiliary view */
323   }
324  
325  
326 < extern int
326 > int
327   dev_input(void)                 /* get X11 input */
328   {
329          inpresflags = 0;
# Line 343 | Line 339 | dev_input(void)                        /* get X11 input */
339   }
340  
341  
342 < extern void
342 > void
343   dev_paintr(             /* fill a rectangle */
344          uby8    rgb[3],
345          int  xmin,
# Line 366 | Line 362 | dev_paintr(            /* fill a rectangle */
362   }
363  
364  
365 < extern int
365 > int
366   dev_flush(void)                 /* flush output */
367   {
368          qtUpdate();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines