RE: bug in pfGetPWinWSWindow ??

New Message Reply Date view Thread view Subject view Author view

From: Dick Rous (dick++at++sgi.com)
Date: 08/13/2001 09:13:55


Using pfPWin's makes your program run in MP mode:
separate processes are forked for CULL and DRAW.
you either have to force your prog to single process execution mode
with pfMultiprocess(PFMP_APPCULLDRAW) (just after pfInit) or allocate
your data structures from a shared arena.
See the OpenGL Performer Programmer's guide for details.
Also look at /usr/share/Performer/src/pguide/libpf/C/pipewin.c as an
example of the basic structure of an MP-safe pfProg.

Hope this helps.

Cheers,

Dick.
____________________________________________________________________
Dick Rous SGI - European Technical Support
email: dick++at++sgi.com
phone: +31-35-6423160 fax: +31-35-6423162 VNET: 955-6868
mobile: +31-653-429834 ETS Central Phone: +44 8700 716 300

"Doe iets, Tom Poes. Verzin een list." (Ollie B. Bommel)
____________________________________________________________________

 

-----Original Message-----
From: Dan Johnston [mailto:dan.johnston++at++nrc.ca]
Sent: Monday, 13 August, 2001 14:17
To: info-performer++at++sgi.com
Subject: bug in pfGetPWinWSWindow ??

Hi group;

I have a problem with this function call. It always returns a '0' value
for the
Xwindow 'Window' parameter. The pfWindow version of this function
works OK.

Environment: IRIX 6.5.12, Performer 2.4. ONYX IR2 Deskside.

As a verification, I tried the code found in
/usr/share/Performer/src/pguide/libpr/C/hlcube.c

First I tried the program un-modified. It works OK on
my computer. Then I changed all the references to pfWindow
to a pfPipeWindow (I need the pfPipeWindow as a
parameter to initialize a pfGUI). The program halts
with a error in the X-windows input. The 'Window' parameter
is 'bad'. It has a '0' value.

The differences I made to the code were minor, as you can see
from the following 'diff' output. The full program is attached
for those who wish to try other versions of IRIX or Performer.

Is there a patch to this yet? Or, can I get around this problem and
still have a pfPipeWindow to initialize my GUI with?

Thanks for any help!

++++++++++++++++++ diff output ++++++++++++++++++++
prompt>>> diff hlcube.c /usr/share/Performer/src/pguide/libpr/C/hlcube.c

77d76
< #include <Performer/pf.h>
85c84
< static void do_events(pfPipeWindow *win);

---
> static void do_events(pfWindow *win);
189c188
<     pfPipeWindow         *win;
---
>     pfWindow         *win;
198d196
<     pfConfig();
203,207c201,205
<     win = pfNewPWin( pfGetPipe( 0 ) );
<     pfPWinOriginSize(win, 0, 0, 500, 500);
<     pfPWinName(win, "Performer cubes");
<     pfPWinType(win, PFWIN_TYPE_X);
<     pfOpenPWin(win);
---
>     win = pfNewWin(NULL);
>     pfWinOriginSize(win, 0, 0, 500, 500);
>     pfWinName(win, "Performer cubes");
>     pfWinType(win, PFWIN_TYPE_X);
>     pfOpenWin(win);
217c215
<     xwin = pfGetPWinWSWindow(win);
---
>     xwin = pfGetWinWSWindow(win);
318c316
< do_events(pfPipeWindow *win)
---
> do_events(pfWindow *win)
393c391
<       pfSwapPWinBuffers(win);
---
>       pfSwapWinBuffers(win);
+++++++++++++++++++++++++++++++++++++++++++++++

-- ___|__ | / | \ ||\ Daniel (Dan) Johnston /___|___\ || \ Dan.Johnston++at++nrc.ca _____|____ || \ National Research Council of Canada, London, ON | | | || \ Integrated Manufacturing Technologies Institute \___| | | ||____\ Tel: (519) 430-7081 Fax: (519) 430-7090 \_o_\___|____|_|______\_ Inst: http://www.nrc.ca/imti \ o / These opinions are my own! Not those of NRC. \________________/ Virtual Reality: http://www.nrc.ca/imti/vetc/home.html More Tall Ships - Fewer Computers!


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Aug 13 2001 - 09:14:15 PDT

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