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

Comparing ray/src/hd/rhdisp.c (file contents):
Revision 3.3 by gregl, Fri Nov 21 15:11:43 1997 UTC vs.
Revision 3.4 by gregl, Fri Nov 21 16:10:17 1997 UTC

# Line 21 | Line 21 | VIEW   dvw;                    /* our current display view */
21  
22   char    *progname;              /* global argv[0] */
23  
24 < #define SERV_READY      01
25 < #define DEV_READY       02
24 > #define RDY_SRV 01
25 > #define RDY_DEV 02
26  
27  
28   main(argc, argv)
# Line 39 | Line 39 | char   *argv[];
39                                          /* enter main loop */
40          do {
41                  rdy = disp_wait();
42 <                if (rdy & DEV_READY) {          /* get user input */
42 >                if (rdy & RDY_DEV) {            /* get user input */
43                          inp = dev_input();
44                          if (inp & DEV_NEWVIEW)
45                                  new_view(&odev.v);
46                          if (inp & DEV_SHUTDOWN)
47                                  serv_request(DR_SHUTDOWN, 0, NULL);
48 +                        if (inp & DEV_REDRAW) {
49 +                                beam_sync();
50 +                                imm_mode = 1;   /* preempt updates */
51 +                        }
52                          if (inp & DEV_WAIT)
53                                  pause = 1;
54                          if (inp & DEV_RESUME) {
# Line 52 | Line 56 | char   *argv[];
56                                  pause = 0;
57                          }
58                  }
59 <                if (rdy & SERV_READY) {         /* get server result */
59 >                if (rdy & RDY_SRV) {            /* get server result */
60                          res = serv_result();
61                          if (pause && res != DS_SHUTDOWN) {
62                                  serv_request(DR_ATTEN, 0, NULL);
# Line 76 | Line 80 | disp_wait()                    /* wait for more input */
80          register int    i;
81                                  /* see if we can avoid select call */
82          if (imm_mode || stdin->_cnt > 0)
83 <                return(SERV_READY);
83 >                return(RDY_SRV);
84          if (dev_flush())
85 <                return(DEV_READY);
85 >                return(RDY_DEV);
86                                  /* make the call */
87          FD_ZERO(&readset); FD_ZERO(&errset);
88          FD_SET(0, &readset);
# Line 94 | Line 98 | disp_wait()                    /* wait for more input */
98          }
99          flgs = 0;               /* flag what's ready */
100          if (FD_ISSET(0, &readset) || FD_ISSET(0, &errset))
101 <                flgs |= SERV_READY;
101 >                flgs |= RDY_SRV;
102          if (FD_ISSET(odev.ifd, &readset) || FD_ISSET(odev.ifd, &errset))
103 <                flgs |= DEV_READY;
103 >                flgs |= RDY_DEV;
104          return(flgs);
105   }
106  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines