Daniela Rainer (zrgr0390++at++visin2.rus.uni-stuttgart.de)
Thu, 13 Jun 1996 14:37:55 +0000
Now stereo in a X window is working in my Performer 2.0 programm.
For those people who are interested in stereo: I made two mistakes:
1. I opened the window with pfOpenPWin. That doesn't configure the window for
stereo. You have to open the window with pfuGLXWinopen. (I don't know
the difference between pfOpenPwin and pfuGLXWinopen, perhaps the
Performer people can tell me the difference). This method is working:
pfPipe *p;
static int FBAttr[] = { PFFB_RGBA, PFFB_DOUBLEBUFFER, PFFB_STEREO, NULL};
p = pfGetPWinPipe(pw);
if (!(glxWindow = pfuGLXWinopen(p, pw, "")))
pfNotify(PFNFY_FATAL, PFNFY_RESOURCE, "Could not create GLX Window.");
glWindow = glxWindow->glWin;
xdisplay = pfGetCurWSConnection();
pfChoosePWinFBConfig(pw, FBAttr );
2. In the PreDraw-Callback I cleared the channel before I set the buffer. The
right order is
if (stereoFlag)
{
XSGISetStereoBuffer(xdisplay, glWindow, STEREO_BUFFER_LEFT);
XSync(xdisplay, False);
pfClearChan(chan);
}
else
{
XSGISetStereoBuffer(xdisplay, glWindow, STEREO_BUFFER_RIGHT);
XSync(xdisplay, False);
pfClearChan(chan);
}
stereoFlag = !stereoFlag;
Regards
Daniela
-- ---------------------------------------------------------------------------- Daniela Rainerrainer++at++rus.uni-stuttgart.de Tel.: ++49-(0)711-685-5970 ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer.html Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:00 PDT