1 |
– |
/* Copyright (c) 1999 Silicon Graphics, Inc. */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ SGI"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* OpenGL GLX driver for holodeck display. |
6 |
|
* Based on old GLX driver using cones. |
223 |
|
setstereobuf(STEREO_BUFFER_LEFT); |
224 |
|
#endif |
225 |
|
checkglerr("setting rendering parameters"); |
226 |
< |
copystruct(&odev.v, &stdview); |
226 |
> |
odev.v = stdview; |
227 |
|
odev.v.type = VT_PER; |
228 |
|
/* map the window */ |
229 |
|
XMapWindow(ourdisplay, gwind); |
306 |
|
XResizeWindow(ourdisplay, gwind, odev.hres, odev.vres); |
307 |
|
dev_input(); /* get resize event */ |
308 |
|
} |
309 |
< |
copystruct(&odev.v, nv); /* setview() already called */ |
309 |
> |
odev.v = *nv; /* setview() already called */ |
310 |
|
} |
311 |
|
#ifdef STEREO |
312 |
< |
copystruct(&vwright, nv); |
312 |
> |
vwright = *nv; |
313 |
|
d = eyesepdist / sqrt(nv->hn2); |
314 |
|
VSUM(vwright.vp, nv->vp, nv->hvec, d); |
315 |
|
/* setview(&vwright); -- Unnecessary */ |
559 |
|
double d,d1; |
560 |
|
register int li; |
561 |
|
/* start with old view */ |
562 |
< |
copystruct(&nv, &odev.v); |
562 |
> |
nv = odev.v; |
563 |
|
/* orient our motion */ |
564 |
|
if (viewray(v1, odir, &odev.v, |
565 |
|
(dx+.5)/odev.hres, (dy+.5)/odev.vres) < -FTINY) |
734 |
|
dev_zmin = odev.v.vfore; |
735 |
|
if (odev.v.vaft > FTINY) |
736 |
|
dev_zmax = odev.v.vaft; |
737 |
< |
if (dev_zmin < dev_zmax/500.) |
738 |
< |
dev_zmin = dev_zmax/500.; |
737 |
> |
if (dev_zmin*500. < dev_zmax) |
738 |
> |
dev_zmax = dev_zmin*500.; |
739 |
|
xmax = dev_zmin * tan(PI/180./2. * odev.v.horiz); |
740 |
|
xmin = -xmax; |
741 |
|
d = odev.v.hoff * (xmax - xmin); |