Sharon Clay (src++at++rose.asd.sgi.com)
Sat, 7 Dec 1996 13:01:27 -0800
As Steve Baker pointed out, you can do this. OpenGL lets you share texture
objects and GL display lists between graphics contexts (and windows)
in a process share group (meaning the windows have to be of the same pfPipe
as you are doing). We did not have windows of a pfPipe share these states
by default in Performer 2.0 or 2.1 but probably will in the future.
This sharing of GL objects must be declared at the time that a graphics
context is created (ie. when a window is opened).
Add this line of code to your window creation section for each window (before
pfPWinConfig():
pfPWinShare(pwin[i], PFWIN_SHARE_GL_CXT | PFWIN_SHARE_STATE_BIT | PFWIN_SHARE_GL_OBJS);
if (i)
pfAttachPWin(pwin[0], pwin[i]);
Also, on IMPACT, you will need the latest IMPACT patch (1447)
for state sharing to work. Maybe Guy can confirm that I have this correct.
Given all this, let me point out that there will still be some penalty paid
(probaby on the order of 1 msec) for switching between the multiple windows
as you draw so be sure you want the functionality that you are paying for and
can't get away with using multiple viewports in a single window.
A common reason for using multiple windows is for GUI - in which case,
it is worth it to have extra logic to not update a window if it is not dirty.
If the window is managed by Performer and drawn with a pfChannel, you will need
to turn off the channel draw traversal mask (pfChanTravMask()) to make sure that we
don't touch the window.
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
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:06 PDT