13 |
|
VIEW v; /* base view parameters */ |
14 |
|
int hres, vres; /* base view resolution */ |
15 |
|
int ifd; /* input file descriptor (for select) */ |
16 |
+ |
int firstuse; /* non-zero if driver can't recycle samples */ |
17 |
|
int inpready; /* number of unprocessed input events */ |
18 |
|
} odev; /* our open device */ |
19 |
|
|
20 |
+ |
extern char odev_args[]; /* command arguments, if any */ |
21 |
+ |
|
22 |
|
extern int imm_mode; /* bundles are being delivered immediately */ |
23 |
|
|
24 |
|
extern double eyesepdist; /* world eye separation distance */ |
27 |
|
#define DC_SETVIEW 0 /* set the base view */ |
28 |
|
#define DC_GETVIEW 1 /* print the current base view */ |
29 |
|
#define DC_LASTVIEW 2 /* restore previous view */ |
30 |
< |
#define DC_PAUSE 3 /* pause the current calculation */ |
31 |
< |
#define DC_RESUME 4 /* resume the calculation */ |
32 |
< |
#define DC_REDRAW 5 /* redraw from server */ |
33 |
< |
#define DC_KILL 6 /* kill rtrace process(es) */ |
34 |
< |
#define DC_RESTART 7 /* restart rtrace process(es) */ |
35 |
< |
#define DC_CLOBBER 8 /* clobber holodeck file */ |
36 |
< |
#define DC_QUIT 9 /* quit the program */ |
30 |
> |
#define DC_FOCUS 3 /* view focus */ |
31 |
> |
#define DC_PAUSE 4 /* pause the current calculation */ |
32 |
> |
#define DC_RESUME 5 /* resume the calculation */ |
33 |
> |
#define DC_REDRAW 6 /* redraw from server */ |
34 |
> |
#define DC_KILL 7 /* kill rtrace process(es) */ |
35 |
> |
#define DC_RESTART 8 /* restart rtrace process(es) */ |
36 |
> |
#define DC_CLOBBER 9 /* clobber holodeck file */ |
37 |
> |
#define DC_QUIT 10 /* quit the program */ |
38 |
|
|
39 |
< |
#define DC_NCMDS 10 /* number of commands */ |
39 |
> |
#define DC_NCMDS 11 /* number of commands */ |
40 |
|
|
41 |
|
/* dev_input() returns flags from above */ |
42 |
|
#define DFL(dc) (1<<(dc)) |
43 |
|
|
44 |
|
#define CTRL(c) ((c)-'@') |
45 |
|
/* commands entered in display window */ |
46 |
< |
#define DV_INIT {'\0','v','l','p','\r',CTRL('L'),'K','R','C','q'} |
46 |
> |
#define DV_INIT {'\0','v','l','f','p','\r',CTRL('L'),'K','R','C','q'} |
47 |
|
/* commands entered on stdin */ |
48 |
< |
#define DC_INIT {"VIEW=","where","last","pause","resume","redraw",\ |
49 |
< |
"kill","restart","clobber","quit"} |
48 |
> |
#define DC_INIT {"VIEW=","where","last","frame","pause","resume",\ |
49 |
> |
"redraw","kill","restart","clobber","quit"} |
50 |
|
|
51 |
|
|
52 |
|
/************************************************************************ |
105 |
|
Called when odev struct file descriptor shows input is ready. |
106 |
|
Returns flags indicating actions to take in the control process. |
107 |
|
If the DC_VIEW or DC_RESIZE flag is returned, the odev |
108 |
< |
structure must be updated beforehand. No events will be |
109 |
< |
ready when this function returns, and odev.inpready will be 0. |
108 |
> |
structure must be updated beforehand. If the DC_FOCUS |
109 |
> |
flag is set, then odev_args contains the frame dimensions. |
110 |
> |
No events shall remain when this function returns, |
111 |
> |
and odev.inpready will therefore be 0. |
112 |
|
|
113 |
|
void |
114 |
|
dev_auxcom(cmd, args) : process auxiliary command |
133 |
|
|
134 |
|
|
135 |
|
void |
136 |
+ |
dev_section(gf, pf) : add geometry and ports for rendering |
137 |
+ |
char *gf; : geometry file name |
138 |
+ |
char *pf; : portal file name(s) |
139 |
+ |
|
140 |
+ |
Add the given geometry file to the list of geometry to render for |
141 |
+ |
intermediate views if direct geometry rendering is available. The |
142 |
+ |
second argument gives the name(s) of any portal geometry files |
143 |
+ |
associated with this section. Multiple portal file names are separated |
144 |
+ |
by spaces. A single octree file will be given for the geometry, ending |
145 |
+ |
in the ".oct" suffix. Portal files will be given as zero or more |
146 |
+ |
Radiance scene description file names. If no portals are given for |
147 |
+ |
this section, the string may be NULL. The character strings are |
148 |
+ |
guaranteed to be static (or permanently allocated) such that they may |
149 |
+ |
be safely stored as a pointer. The same pointers or file lists may be |
150 |
+ |
(and often are) given repeatedly. If a given geometry file does not |
151 |
+ |
exist, the call should be silently ignored. If gf is NULL, then the |
152 |
+ |
last section has been given, and the display can be updated with the |
153 |
+ |
new information. |
154 |
+ |
|
155 |
+ |
|
156 |
+ |
void |
157 |
|
dev_close() : close the display |
158 |
|
|
159 |
|
Close the display device and free up resources in preparation for exit. |
164 |
|
|
165 |
|
|
166 |
|
extern VIEW *dev_auxview(); |
167 |
+ |
|
168 |
+ |
extern int *beam_view(); |