49 |
|
#define BORWIDTH 5 /* border width */ |
50 |
|
#endif |
51 |
|
|
52 |
– |
#ifndef FEQ |
53 |
– |
#define FEQ(a,b) ((a)-(b) <= FTINY && (a)-(b) >= -FTINY) |
54 |
– |
#endif |
55 |
– |
|
52 |
|
#define VWHEADLOCK 01 /* head position is locked flag */ |
53 |
|
#define VWPERSP 02 /* perspective view is set */ |
54 |
|
#define VWORTHO 04 /* orthographic view is set */ |
149 |
|
extern time_t time(); |
150 |
|
|
151 |
|
|
152 |
< |
extern void |
152 |
> |
void |
153 |
|
dev_open(id) /* initialize GLX driver */ |
154 |
|
char *id; |
155 |
|
{ |
282 |
|
} |
283 |
|
|
284 |
|
|
285 |
< |
extern void |
285 |
> |
void |
286 |
|
dev_close(void) /* close our display and free resources */ |
287 |
|
{ |
288 |
|
#ifdef DOBJ |
305 |
|
} |
306 |
|
|
307 |
|
|
308 |
< |
extern void |
308 |
> |
void |
309 |
|
dev_clear(void) /* clear our representation */ |
310 |
|
{ |
311 |
|
viewflags |= VWCHANGE; /* pretend our view has changed */ |
315 |
|
} |
316 |
|
|
317 |
|
|
318 |
< |
extern int |
318 |
> |
int |
319 |
|
dev_view( /* assign new driver view */ |
320 |
|
VIEW *nv |
321 |
|
) |
333 |
|
} |
334 |
|
if (nv != &odev.v) { |
335 |
|
/* resize window? */ |
336 |
< |
if (!FEQ(nv->horiz,odev.v.horiz) || |
337 |
< |
!FEQ(nv->vert,odev.v.vert)) { |
336 |
> |
if (!FABSEQ(nv->horiz,odev.v.horiz) || |
337 |
> |
!FABSEQ(nv->vert,odev.v.vert)) { |
338 |
|
int dw = DisplayWidth(ourdisplay,ourscreen); |
339 |
|
int dh = DisplayHeight(ourdisplay,ourscreen); |
340 |
|
|
372 |
|
} |
373 |
|
|
374 |
|
|
375 |
< |
extern void |
375 |
> |
void |
376 |
|
dev_section( /* add octree for geometry rendering */ |
377 |
|
char *gfn, |
378 |
|
char *pfn |
397 |
|
} |
398 |
|
|
399 |
|
|
400 |
< |
extern void |
400 |
> |
void |
401 |
|
dev_auxcom( /* process an auxiliary command */ |
402 |
|
char *cmd, |
403 |
|
char *args |
419 |
|
} |
420 |
|
|
421 |
|
|
422 |
< |
extern VIEW * |
422 |
> |
VIEW * |
423 |
|
dev_auxview( /* return nth auxiliary view */ |
424 |
|
int n, |
425 |
|
int hvres[2] |
436 |
|
} |
437 |
|
|
438 |
|
|
439 |
< |
extern int |
439 |
> |
int |
440 |
|
dev_input(void) /* get X11 input */ |
441 |
|
{ |
442 |
|
inpresflags = 0; |
452 |
|
} |
453 |
|
|
454 |
|
|
455 |
< |
extern void |
455 |
> |
void |
456 |
|
dev_value( /* add a pixel value to our texture */ |
457 |
|
COLR c, |
458 |
|
FVECT d, |
471 |
|
} |
472 |
|
|
473 |
|
|
474 |
< |
extern int |
474 |
> |
int |
475 |
|
dev_flush(void) /* flush output as appropriate */ |
476 |
|
{ |
477 |
|
int ndrawn; |