Re: Stereo in a X Window is working now !

New Message Reply Date view Thread view Subject view Author view

Sharon Clay (src++at++rose.asd.sgi.com)
Thu, 13 Jun 1996 14:00:31 -0700


+>---- On Jun 13, 2:37pm, Daniela Rainer wrote:
> Subject: Stereo in a X Window is working now !

->
->Thanks to Larry Peruski and Gerald Hofer who answered to my question!

Thanx from us too :-)

->
->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:

Performer2.0 had a bug in pfChoosePWinFBConfig() configuring IRIS GL windows with
stereo - it should have worked.

->
-> 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;
->

Communicating through X is terribly slow - FYI, you definitey don't want
to ever be doing an XSync() in your drawing!
You can just select left and right buffers directly through the GL.
For IRISGL it is leftbuffer() and rightbuffer() and for
OpenGL it is glDrawBuffer(GL_BACK_LEFT or GL_BACK_RIGHT).

src.
         

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Systems Dev.
src++at++sgi.com  (415) 933 - 1002  FAX: (415) 965 - 2658  MS 8U-590
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++

======================================================================= 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


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:00 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.