Re: pfPipeWindows and OpenGL

New Message Reply Date view Thread view Subject view Author view

Sharon Clay (src++at++rose.asd.sgi.com)
Mon, 20 Jan 1997 18:32:17 -0800


+>---- On Jan 20, 9:54pm, inca++at++public.bta.net.cn wrote:
> Subject: Re: pfPipeWindows and OpenGL
->From guest++at++holodeck.csd.sgi.com Mon Jan 20 06:25:55 1997
->
->> pfInit();
-> _try_ pfMultiprocess(PFMP_APPCULLDRAW);

FYI, this is the default on a single CPU system.

-> ^^^
->> pfConfig();
->>
->> p = pfGetPipe(0);
->> pw = pfNewPWin(p);
->> pfPWinType(pw, PFPWIN_TYPE_X);
->> pfPWinName(pw, "IRIS Performer");
->> pfPWinOriginSize(pw, 0, 0, 500, 500);
->> pfOpenPWin(pw);
->>
->> dpy=pfGetCurWSConnection();
->> win=pfGetPWinWSWindow(pw);
-> _try_ fprintf(stderr,"win is 0x%x\n",win);
-> ^^^
-> is it zero or some number? then move win=pfGetPWinWSWindow(pw);
-> and fprintf(stderr,"win is 0x%x\n",win); to pfOpenPWin(), try
-> PFMP_APPCULLDRAW, PFMP_APP_CULLDRAW.
->
->> wincxt=pfGetPWinGLCxt(pw);
->>
->> glXMakeCurrent(dpy,win,wincxt); /* if win is zero, fault */
->
->key problem is pfGetPWinWSWindow don't work in APP process when multiprocess
->case. man page say it works, but it don't.

It does work but the window has to have been opened first for you
to be able to get anything back. The window will be opened in the
draw process which isn't even running until after the first call to
pfFrame(). Since we don't propagate requests from one app frame until
you have called pfFrame(), you have to call pfFrame() after the request
to open the window. Even so, since it is an asynchronous request,
if you call pfGetPWinWSWindow() right away you still might get back
0x0 and might have to loop waiting for the result. An example of
how to more resonably structure such code is in pguide/libpf/C/complex.c
where each frame we check to see if the window is initialized and then
once get back an indication that it is go and do all of the other
X window hook-up stuff.

Hope this helps,
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/
            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:54:23 PDT

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