--- ray/src/hd/rhd_ogl.c 2005/01/21 00:52:59 3.27 +++ ray/src/hd/rhd_ogl.c 2012/09/06 00:07:43 3.31 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rhd_ogl.c,v 3.27 2005/01/21 00:52:59 greg Exp $"; +static const char RCSid[] = "$Id: rhd_ogl.c,v 3.31 2012/09/06 00:07:43 greg Exp $"; #endif /* * OpenGL driver for holodeck display. @@ -235,8 +235,8 @@ char *id; /* set window manager hints */ ourxwmhints.flags = InputHint|IconPixmapHint; ourxwmhints.input = True; - ourxwmhints.icon_pixmap = XCreateBitmapFromData(ourdisplay, - gwind, x11icon_bits, x11icon_width, x11icon_height); + ourxwmhints.icon_pixmap = XCreateBitmapFromData(ourdisplay, gwind, + (char *)x11icon_bits, x11icon_width, x11icon_height); XSetWMHints(ourdisplay, gwind, &ourxwmhints); oursizhints.min_width = MINWIDTH; #ifdef STEREO @@ -324,6 +324,9 @@ dev_view( /* assign new driver view */ register VIEW *nv ) { +#ifdef STEREO + double d; +#endif if (nv->type != VT_PER || /* check view legality */ nv->horiz > 160. || nv->vert > 160.) { error(COMMAND, "illegal view type/angle"); @@ -765,7 +768,10 @@ moveview( /* move our view */ { VIEW nv; FVECT odir, v1, wip; - double d, d1; + double d; +#ifdef DOBJ + double d1; +#endif /* start with old view */ nv = odev.v; /* orient our motion */ @@ -790,12 +796,11 @@ moveview( /* move our view */ VSUM(nv.vp, wip, odir, -1.); spinvector(nv.vdir, nv.vdir, nv.vup, d); } else if (orb) { /* orbit up/down */ - fcross(v1, odir, nv.vup); - if (normalize(v1) == 0.) + if (geodesic(odir, odir, nv.vup, + d=MOVDEG*PI/180.*orb, GEOD_RAD) == 0.0) return(0); - spinvector(odir, odir, v1, d=MOVDEG*PI/180.*orb); VSUM(nv.vp, wip, odir, -1.); - spinvector(nv.vdir, nv.vdir, v1, d); + geodesic(nv.vdir, nv.vdir, nv.vup, d, GEOD_RAD); } else if (mov) { /* move forward/backward */ d = MOVPCT/100. * mov; VSUM(nv.vp, nv.vp, odir, d); @@ -821,7 +826,10 @@ getframe( /* get focus frame */ int startx = ebut->x, starty = ebut->y; int endx, endy, midx, midy; FVECT odir, v1; - double d, d1; + double d; +#ifdef DOBJ + double d1; +#endif /* get mouse drag */ XMaskEvent(ourdisplay, ButtonReleaseMask, levptr(XEvent)); endx = levptr(XButtonReleasedEvent)->x;