--- ray/src/hd/rhd_ogl.c 1998/12/31 13:24:36 3.12 +++ ray/src/hd/rhd_ogl.c 1999/01/05 18:16:17 3.15 @@ -1,4 +1,4 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ +/* Copyright (c) 1999 Silicon Graphics, Inc. */ #ifndef lint static char SCCSid[] = "$SunId$ SGI"; @@ -39,6 +39,16 @@ static char SCCSid[] = "$SunId$ SGI"; #ifndef RAYQLEN #define RAYQLEN 0 /* max. rays to queue before flush */ #endif +#ifndef MINWIDTH +#define MINWIDTH 480 /* minimum graphics window width */ +#define MINHEIGHT 400 /* minimum graphics window height */ +#endif +#ifndef VIEWDIST +#define VIEWDIST 356 /* assumed viewing distance (mm) */ +#endif +#ifndef BORWIDTH +#define BORWIDTH 5 /* border width */ +#endif #ifndef FEQ #define FEQ(a,b) ((a)-(b) <= FTINY && (a)-(b) >= -FTINY) @@ -60,13 +70,6 @@ static char SCCSid[] = "$SunId$ SGI"; #define MOVDEG (-5) /* degrees to orbit CW/down /frame */ #define MOVORB(s) ((s)&ShiftMask ? 1 : (s)&ControlMask ? -1 : 0) -#define MINWIDTH 480 /* minimum graphics window width */ -#define MINHEIGHT 400 /* minimum graphics window height */ - -#define VIEWDIST 356 /* assumed viewing distance (mm) */ - -#define BORWIDTH 5 /* border width */ - #define setstereobuf(bid) (glXWaitGL(), \ XSGISetStereoBuffer(ourdisplay, gwind, bid), \ glXWaitX()) @@ -331,14 +334,14 @@ register VIEW *nv; dev_input(); /* get resize event */ } copystruct(&odev.v, nv); /* setview() already called */ -#ifdef STEREO - copystruct(&vwright, nv); - d = eyesepdist / sqrt(nv->hn2); - VSUM(vwright.vp, nv->vp, nv->hvec, d); - /* setview(&vwright); -- Unnecessary */ -#endif viewflags |= VWCHANGE; } +#ifdef STEREO + copystruct(&vwright, nv); + d = eyesepdist / sqrt(nv->hn2); + VSUM(vwright.vp, nv->vp, nv->hvec, d); + /* setview(&vwright); -- Unnecessary */ +#endif wipeclean(); return(1); } @@ -857,7 +860,7 @@ setglpersp() /* set perspective view in GL */ dev_zmax = 100.; } else { dev_zmin = 0.5*depthlim[0]; - dev_zmax = 2.0*depthlim[1]; + dev_zmax = 1.25*depthlim[1]; if (dev_zmin > dev_zmax/5.) dev_zmin = dev_zmax/5.; }