From: Matthew Hall (mahall++at++uiuc.edu)
Date: 02/22/2001 15:10:46
G. Anthony Reina wrote:
>
> I've got a stereo program that I'm converting from a quad-buffered
> stereo monitor to a older top-down stereo monitor.
>
...
> On the top-down stereo, the setmon command is /usr/gfx/setmon -n
> STR_RECT which gives a 1280x1024 screen at 120 Hz.
>
> When I try just setting pfPWinFBConfigAttrs to:
>
> int FBAttrs[] = {
> PFFB_STEREO,
> None
> };
>
> or any variation of the double buffer FB Config (without the
> PFFB_DOUBLEBUFFER since the monitor can't do quad buffering), Performer
> tells me that it can't execute the command properly.
Using STR_RECT, or interlaced, stereo is less automatic. I haven't
tried to use it with performer, but I've made interlaced stereo
apps with pure OpenGL, so I can outline the general idea.
(sorry for any OspenGL terminology - I'm a Performer neophyte)
Interlaced stereo doesn't require any special buffer options
(so don't use PFFB_STEREO, and do use PFFB_DOUBLEBUFFER).
In fact, it doesn't interact with OpenGL at all. Instead,
calling setmon STR_RECT maps the top half of the screen buffer into the
even numbered raster lines, and the bottom half into the odd.
Then it sets the monitor to interlace, starts up the shutter glasses,
and draws the even lines to the left eye on one refresh, and odd to
the right on the other. (I may have reversed even/odd, but the top
does go to the left eye)
So to use stereo in full screen mode,
1) send the setmon command,
2) Set the viewport to (0,0,1280,491) and draw the left eye's view.
3) Set the viewport to (0,532,1023) and draw the right eye's view.
(read more in the manpage stereo(7))
Note that the effective resolution is halved, and that pixels are no
longer square. This is one reason why quad-buffered is much nicer.
Sorry I can't tell you how to use performer to do this, but if
you or someone else can use this information to make interlaced
stereo work in Performer, let me know!
-matt
This archive was generated by hypermail 2b29 : Thu Feb 22 2001 - 15:10:23 PST