pfPipeWindow man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

NAME
     pfPipeWindow, pfInitGfx - Initialize and manipulate pfPipeWindows within
     a pfPipe

FUNCTION SPECIFICATION
     #include <Performer/pf/pfPipeWindow.h>

			   pfPipeWindow::pfPipeWindow();

     static pfType*	   pfPipeWindow::getClassType(void);

     void		   pfPipeWindow::setAspect(int x, int y);

     void		   pfPipeWindow::setConfigFunc(pfPWinFuncType func);

     void		   pfPipeWindow::setFBConfig(XVisualInfo* vi);

     void		   pfPipeWindow::setFBConfigAttrs(int *attr);

     void		   pfPipeWindow::setFBConfigData(void *data);

     void		   pfPipeWindow::setFBConfigId(int id);

     void		   pfPipeWindow::setFullScreen(void);

     void		   pfPipeWindow::setGLCxt(pfGLContext gc);

     void		   pfPipeWindow::setIndex(int index);

     void		   pfPipeWindow::setMode(int mode, int val);

     void		   pfPipeWindow::setName(const char *name);

     void		   pfPipeWindow::setOrigin(int xo, int yo);

     void		   pfPipeWindow::setOriginSize(int xo, int yo, int xs,
			     int ys);

     void		   pfPipeWindow::setOverlayWin(pfWindow *ow);

     void		   pfPipeWindow::setScreen(int screen);

     void		   pfPipeWindow::setShare(int mode);

     void		   pfPipeWindow::setSize(int xs, int ys);

     void		   pfPipeWindow::setStatsWin(pfWindow *sw);

     void		   -
			   pfPipeWindow::setWSConnectionName(const char *name);

									Page 1

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     void		   pfPipeWindow::setWSDrawable(pfWSConnection dsp,
			     pfWSDrawable gxw);

     void		   pfPipeWindow::setWSWindow(pfWSConnection dsp,
			     pfWSWindow wsw);

     void		   pfPipeWindow::setWinList(pfList *wlist);

     void		   pfPipeWindow::setWinType(uint type);

     void		   pfPipeWindow::getAspect(int *x, int *y);

     pfChannel*		   pfPipeWindow::getChan(int which);

     int		   pfPipeWindow::getChanIndex(pfChannel *chan);

     pfPWinFuncType	   pfPipeWindow::getConfigFunc(void);

     void		   pfPipeWindow::getCurOriginSize(int *xo, int *yo,
			     int *xs, int *ys);

     void		   pfPipeWindow::getCurScreenOriginSize(int *xo,
			     int *yo, int *xs, int *ys);

     pfState*		   pfPipeWindow::getCurState(void);

     pfWSDrawable	   pfPipeWindow::getCurWSDrawable(void);

     XVisualInfo*	   pfPipeWindow::getFBConfig(void);

     int*		   pfPipeWindow::getFBConfigAttrs(void);

     void*		   pfPipeWindow::getFBConfigData(void);

     int		   pfPipeWindow::getFBConfigId(void);

     pfGLContext	   pfPipeWindow::getGLCxt(void);

     int		   pfPipeWindow::getIndex(void);

     int		   pfPipeWindow::getMode(int mode);

     const char*	   pfPipeWindow::getName(void);

     int		   pfPipeWindow::getNumChans(void);

     void		   pfPipeWindow::getOrigin(int *xo, int *yo);

     pfWindow*		   pfPipeWindow::getOverlayWin(void);

									Page 2

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     pfPipe*		   pfPipeWindow::getPipe(void);

     int		   pfPipeWindow::getPipeIndex(void);

     pfPipeVideoChannel	   pfPipeWindow::getPosPVChan(int x, int y);

     int		   pfPipeWindow::getScreen(void);

     void		   pfPipeWindow::getScreenOrigin(int *xo, int *yo);

     pfWindow*		   pfPipeWindow::getSelect(void);

     uint		   pfPipeWindow::getShare(void);

     void		   pfPipeWindow::getSize(int *xs, int *ys);

     pfWindow*		   pfPipeWindow::getStatsWin(void);

     const char *	   pfPipeWindow::getWSConnectionName(void);

     pfWSDrawable	   pfPipeWindow::getWSDrawable(void);

     Window		   pfPipeWindow::getWSWindow(void);

     pfList*		   pfPipeWindow::getWinList(void);

     uint		   pfPipeWindow::getWinType(void);

     void		   pfPipeWindow::setPVChan(int num,
			     pfPipeVideoChannel *pvchan);

     void		   -
			   pfPipeWindow::addPVChan(pfPipeVideoChannel *pvchan);

     void		   -
			   pfPipeWindow::removePVChan(pfPipeVideoChannel *pvchan);

     void		   pfPipeWindow::removePVChanIndex(int num);

     int		   pfPipeWindow::getNumPVChans(void);

     pfPipeVideoChannel*   pfPipeWindow::getPVChan(int num);

     pfPipeVideoChannel*   pfPipeWindow::getPVChanId(int num);

     int		   -
			   pfPipeWindow::getPVChanIndex(pfPipeVideoChannel *pvchan);

     void		   pfPipeWindow::bindPVChans(void);

									Page 3

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     void		   pfPipeWindow::unbindPVChans(void);

     int		   pfPipeWindow::attach(pfPipeWindow *pw);

     int		   pfPipeWindow::attachWin(pfWindow *w);

     pfFBConfig		   pfPipeWindow::chooseFBConfig(pfWSConnection dsp,
			     int screen, int *attr);

     void		   pfPipeWindow::close(void);

     void		   pfPipeWindow::closeGL(void);

     void		   pfPipeWindow::config(void);

     int		   pfPipeWindow::isOpen(void);

     int		   pfPipeWindow::isManaged(void);

     int		   pfPipeWindow::mQuery(int *which, int *dst);

     void		   pfPipeWindow::open(void);

     int		   pfPipeWindow::query(int which, int *dst);

     pfWindow*		   pfPipeWindow::select(void);

     void		   pfPipeWindow::attachSwapGroup(pfPipeWindow* pwin1);

     void		   pfPipeWindow::attachWinSwapGroup(pfWindow* win);

     int		   pfPipeWindow::inSwapGroup(void);

     void		   pfPipeWindow::setSwapBarrier(int barrier);

     int		   pfPipeWindow::getSwapBarrier(void);

     void		   pfPipeWindow::swapBuffers(void);

     void		   pfPipeWindow::addChan(pfChannel *chan);

     void		   pfPipeWindow::insertChan(int where,
			     pfChannel *chan);

     void		   pfPipeWindow::moveChan(int where, pfChannel *chan);

     void		   pfPipeWindow::removeChan(pfChannel *chan);

     extern void	   pfInitGfx(void);

									Page 4

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

	  /* pfPipeWindow-specific types */
	  typedef void (*pfPWinFuncType)(pfPipeWindow *pw);

	  /* X-Window system based Performer types */
	  typedef Display	  *pfWSConnection;
	  typedef XVisualInfo	  pfFBConfig;
	  typedef Window	  pfWSWindow;
	  typedef Drawable	  pfWSDrawable;

	  typedef GLXFBConfigSGIX pfGLXFBConfig;
	  typedef GLXContext	  pfGLContext;

PARENT CLASS FUNCTIONS
     The OpenGL Performer class pfPipeWindow is derived from the parent class
     pfObject, so each of these member functions of class pfObject are also
     directly usable with objects of class pfPipeWindow.  This is also true
     for ancestor classes of class pfObject.

     void*   pfObject::operator new(size_t);
     void*   pfObject::operator new(size_t, pfFluxMemory *fmem);
     void    pfObject::setUserData(void *data);
     void    pfObject::setUserData(int slot, void *data);
     void*   pfObject::getUserData(pfObject *obj);
     void*   pfObject::getUserData(pfObject *obj, int slot);
     int     pfObject::getNumUserData();

     Since the class pfObject is itself derived from the parent class
     pfMemory, objects of class pfPipeWindow can also be used with these
     functions designed for objects of class pfMemory.

     void*	    pfMemory::getData(const void *ptr);
     pfType *	    pfMemory::getType();
     int	    pfMemory::isOfType(pfType *type);
     int	    pfMemory::isExactType(pfType *type);
     const char *   pfMemory::getTypeName();
     int	    pfMemory::copy(pfMemory *src);
     int	    pfMemory::compare(const pfMemory *mem);
     void	    pfMemory::print(uint which, uint verbose, char *prefix,
		      FILE *file);
     int	    pfMemory::getArena(void *ptr);
     void*	    pfMemory::getArena();
     int	    pfMemory::ref();
     int	    pfMemory::unref();
     int	    pfMemory::unrefDelete();
     int	    pfMemory::unrefGetRef();
     int	    pfMemory::getRef();
     int	    pfMemory::checkDelete();

									Page 5

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     int	    pfMemory::isFluxed();
     void *	    pfMemory::getArena();
     int	    pfMemory::getSize();

PARAMETERS
     pwin  identifies a pfPipeWindow.

     dsp   identifies a pfWSConnection.

     wsw   identifies a pfWSWindow.

     gxw   identifies a pfWSDrawable.

     gc	   identifies a pfGLContext.

DESCRIPTION
     OpenGL Performer programs render a pfChannel to a pfPipeWindow of the
     same parent pfPipe. Multiple pfPipeWindows can be open on a single
     pfPipe. A pfPipe and all of its windows have the same screen, or hardware
     graphics pipeline.	 By default, pfChannels are assigned to the first
     pfPipeWindow of a pfPipe.	pfChannels can be removed from the
     pfPipeWindow and assigned to other pfPipeWindows.	pfPipeWindows can be
     opened/closed and created at any time.  Refer to the pfPipe man page for
     more information on how pfPipeWindows fit into the hierarchy of pfPipes,
     pfPipeWindows, and pfChannels.

     pfPipeWindows are similar to pfWindows but are tracked/maintained by
     libpf and are needed by libpf to draw pfChannels.	Because of their
     similarity, many of the pfPipeWindow routines are identical to pfWindow
     routines except for the fact that the pfPWin<*> routines operate on a
     pfPipeWindow and the pfWin<*> routines operate on a pfWindow.  These
     corresponding routines are listed in the table below and their
     functionality is documented in the pfWindow man page.  Routines
     documented here have special extended functionality for pfPipeWindows.

									Page 6

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

		pfPipeWindow routine		pfWindow routine
	    __________________________________________________________
	    pfPWinAspect		   pfWinAspect
	    pfPWinFBConfig		   pfWinFBConfig
	    pfPWinFBConfigAttrs		   pfWinFBConfigAttrs
	    pfPWinFBConfigData		   pfWinFBConfigData
	    pfPWinFBConfigId		   pfWinFBConfigId
	    pfPWinFullScreen		   pfWinFullScreen
	    pfPWinGLCxt			   pfWinGLCxt
	    pfPWinIndex			   pfWinIndex
	    pfPWinMode			   pfWinMode
	    pfPWinName			   pfWinName
	    pfPWinOrigin		   pfWinOrigin
	    pfPWinOriginSize		   pfWinOriginSize
	    pfPWinOverlayWin		   pfWinOverlayWin
	    pfPWinScreen		   pfWinScreen
	    pfPWinShare			   pfWinShare
	    pfPWinSize			   pfWinSize
	    pfPWinStatsWin		   pfWinStatsWin
	    pfPWinWSConnectionName	   pfWinWSConnectionName
	    pfPWinWSDrawable		   pfWinWSDrawable
	    pfPWinWSWindow		   pfWinWSWindow
	    pfGetPWinAspect		   pfGetWinAspect
	    pfGetPWinCurOriginSize	   pfGetWinCurOriginSize
	    pfGetPWinCurScreenOriginSize   pfGetWinCurScreenOriginSize
	    pfGetPWinCurState		   pfGetWinCurState
	    pfGetPWinCurWSDrawable	   pfGetWinCurWSDrawable
	    pfGetPWinFBConfig		   pfGetWinFBConfig
	    pfGetPWinFBConfigAttrs	   pfGetWinFBConfigAttrs
	    pfGetPWinFBConfigData	   pfGetWinFBConfigData
	    pfGetPWinFBConfigId		   pfGetWinFBConfigId
	    pfGetPWinGLCxt		   pfGetWinGLCxt
	    pfGetPWinIndex		   pfGetWinIndex
	    pfGetPWinList		   pfGetWinList
	    pfGetPWinMode		   pfGetWinMode
	    pfGetPWinName		   pfGetWinName
	    pfGetPWinOrigin		   pfGetWinOrigin
	    pfGetPWinOverlayWin		   pfGetWinOverlayWin
	    pfGetPWinScreen		   pfGetWinScreen
	    pfGetPWinSelect		   pfGetWinSelect
	    pfGetPWinShare		   pfGetWinShare
	    pfGetPWinSize		   pfGetWinSize

					 |

									Page 7

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

		 pfPipeWindow routine	       pfWindow routine
	       ____________________________________________________
	       pfGetPWinStatsWin	   pfGetWinStatsWin
	       pfGetPWinType		   pfGetWinType
	       pfGetPWinWSConnectionName   pfGetWinWSConnectionName
	       pfGetPWinWSDrawable	   pfGetWinWSDrawable
	       pfGetPWinWSWindow	   pfGetWinWSWindow
	       pfChoosePWinFBConfig	   pfChooseWinFBConfig
	       pfAttachPWin		   pfAttachWin
	       pfSelectPWin		   pfSelectWin
	       pfAttachPWinSwapGroup	   pfAttachWinSwapGroup
	       pfAttachPWinWinSwapGroup	   pfAttachWinSwapGroup
	       pfPWinInSwapGroup	   pfWinInSwapGroup
	       pfPWinSwapBarrier	   pfWinSwapBarrier
	       pfGetPWinSwapBarrier	   pfGetWinSwapBarrier
	       pfSwapPWinBuffers	   pfSwapWinBuffers
	       pfIsPWinOpen		   pfIsWinOpen
	       pfIsManagedPWin		   pfIsManagedWin
	       pfQueryPWin		   pfQueryWin
	       pfMQueryPWin		   pfMQueryWin
					 |

     pfPipeWindow::new creates and returns a handle to a pfPipeWindow on the
     screen managed by pipe.  Like other pfUpdatables, pfPipeWindows are
     always allocated from shared memory.  new pfPipeWindow creates and
     returns a handle to a pfPipeWindow.  Like other pfUpdatables,
     pfPipeWindows are always allocated from shared memory and cannot be
     created statically, on the stack or in arrays.  The pipe of a
     pfPipeWindow cannot be changed.  pfGetPWinPipe returns a pointer to the
     pfPipe of pwin.  Like other pfObjects, pfPipeWindows must be created in
     the application process.

     pfPipeWindow::getClassType returns the pfType* for the class
     pfPipeWindow.  The pfType* returned by pfPipeWindow::getClassType is the
     same as the pfType* returned by invoking the virtual function getType on
     any instance of class pfPipeWindow.  Because OpenGL Performer allows
     subclassing of built-in types, when decisions are made based on the type
     of an object, it is usually better to use	the member function isOfType
     to test if an object is of a type derived from a Performer type rather
     than to test for strict equality of the pfType*'s.

     pfWindow::setFBConfigId allows you to directly set the OpenGL X visual id
     to be used in configuring the resulting OpenGL/X window.
     pfWindow::getFBConfigId will return the current OpenGL visual id of the
     window (or -1 if the id is not known).  This routine is useful in
     multiprocess operation if you want to be able to directly specify the
     framebuffer configuration of an X window in the application process.  See
     the XVisualIDFromVisual(3X11) and XGetVisualInfo(3X11) man pages for more
     information about X visuals.

     pfPipeWindow::setscreen will set the screen of the pfPipeWindow and on

									Page 8

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     the parent pfPipe.	 Once set, the screen cannot be changed.  If the
     screen of the parent pfPipe had already been set when the pfPipeWindow
     was created, the pfPipeWindow will inherit that screen setting and will
     not accept another.  The pfPipeWindow will direct all rendering comments
     to the hardware graphics pipeline specified by screen.  As with
     pfWindows, if a screen is never set, the default screen of the current
     window system connection will be set as the screen when the window is
     opened with pfPipeWindow::open.  pfPipeWindow::getScreen will return the
     screen of the pfPipeWindow.  If the screen has not yet been set, (-1)
     will be returned.	See the pfGetCurWSConnection man page for more
     information on the specification of a default screen.  See the
     pfPipe::setScreen man page for special restrictions and proper
     specification of pfPipe and pfPipeWindow screens in multipipe
     configurations.

     pfPipeWindow::setWSConnectionName allows you to specify the exact window
     server and default screen for the successive opening of the window. This
     can be used for specifying remote displays or on machines running more
     than one window server.  pfPipeWindow::getWSConnectionName will return
     the name specifying the current window server target.  As with the
     setting of screens, a window server target specified on a pfPipe will
     take precedence over a target set on a pfPipeWindow. If a window server
     target is not specified for the parent pfPipe of a pfPipeWindow, the
     parent pfPipe will inherit the window setting.   Because of these
     restrictions, this routine must be called in the application process,
     before the first call to pfFrame.	See the pfPipe::setScreen man page for
     special restrictions and proper specification of pfPipe and pfPipeWindow
     screens in multipipe configurations.

     pfPipeWindow::getIndex returns the index of the pfPipeWindow in the
     pfPipeWindow list of the parent pfPipe.

     pfChannels are assigned to a pfPipeWindow upon their creation.
     pfPipeWindows also have list-style API for adding, removing, inserting,
     and reordering pfChannels on a pfPipeWindow:  pfPipeWindow::addChan will
     append chan as the last pfChannel of the pfPipeWindow and and returns the
     resulting index or (-1) if an error was encountered.
     pfPipeWindow::insertChan will insert chan as the whereth pfChannel of the
     pfPipeWindow.  pfPipeWindow::moveChan will move chan from its current
     position in the pfChannel list of the pfPipeWindow to position where.  If
     chan does not belong to the pfPipeWindow, no action is taken and an error
     flag of (-1) is returned; otherwise, where is returned.
     pfPipeWindow::removeChan will remove chan from the pfPipeWindow.  If chan
     does not belong to the pfPipeWindow, no action is done and an error flag
     of (-1) is returned.  Otherwise, the previous index of chan is returned.
     pfPipeWindow::getChan returns a pointer to the indexth pfChannel of the
     pfPipeWindow. pfPipeWindow::getNumChans returns the number of pfChannels
     attached to the pfPipeWindow.  pfPipeWindow::getChanIndex returns the
     index of the chan in the channel list, or (-1) if the pfChannel is not
     attached to the pfPipeWindow.

     pfPipeWindow::close can be called from the application process to close a

									Page 9

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     window.  However, if additional draw process work is needed to be done, a
     pfPipeWindow::config draw process callback should be used.

     pfPipeWindow::config, called from the application process, will trigger
     the configuration callback function to be called in the draw process for
     the current frame.	 If no user configuration callback function has been
     specified, a default configuration function will be called that will open
     and initialize the pfPipeWindow.  pfPipeWindow::setConfigFunc, called
     from the application process, specifies a draw process callback function,
     func, to configure the pfPipeWindow.  The configure function can be used
     to make draw process calls to open, initialize, and close pfPipeWindows.
     In this window configuration callback function pfPipeWindow::open can be
     called on the pfPipeWindow, or an OpenGL window can be created and
     assigned to the pfPipeWindow.  pfGetPWinConfigFunc returns the pointer to
     the user-specified window configuration callback function, or NULL of no
     such function has been set.  If the application is multiprocessed, the
     window is opened asynchronously in the DRAW process.  The draw process is
     activated by a call to pfFrame. This means that an immediate query of
     state from the APP process after an APP process call to
     pfPipeWindow::open or pfPipeWindow::config may not return valid results.

     pfPipeWindow::open will cause the pfPipeWindow to be opened and
     initialized via pfInitGfx. If called from the application process, the
     pfPipeWindow will be automatically opened in the draw process for the
     corresponding frame.  If called in the draw process, the pfPipeWindow
     will be opened automatically.  Similarly, pfPipeWindow::close and
     pfPipeWindow::closeGL can be called from either the application process
     or the draw process and will cause the the pfPipeWindow or the graphics
     context, respectively, to be closed in the draw process for the given
     frame. If application specific work needs to be done in the draw process
     for manipulating pfPipeWindows, pfPipeWindow::config should be used.

     OpenGL Performer automatically calls pfInitGfx for windows that it
     creates and opens. For pfPipeWindows, pfInitGfx does the same operations
     as for pfWindows, and in addition, will apply a default material and a
     default MODULATE texture environment (pfTexEnv::apply), and enable
     backface culling (pfCullFace(PFCF_BACK)).

     pfPipeWindow::setWinList can be used to specify a pfList of pfWindows,
     wlist, that can draw into a single pfPipeWindow. This enables a
     pfPipeWindow to maintain a list of alternate framebuffer configurations
     for the base pfPipeWindow.	 A pfPipeWindow always maintains a default
     main graphics pfWindow and a pfWindow list.  Two of the windows in this
     list are so commonly needed that they have special names and can be
     created automatically for the user: OVERLAY and STATS.  The user can also
     add his own pfWindows to the pfWindow list for additional configurations.
     This list may only hold pfWindows, NOT pfPipeWindows.  With window lists,
     we have an effective pfWindow hierarchy of: screen->pfPipe-
     >pfPipeWindow[graphics, stats, overlay, ...]->pfChannel(s).  See the
     pfWinList man page for more information on these alternate framebuffer
     configuration windows.

								       Page 10

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     pfPipeWindow::setIndex selects pfWindow index from the alternate
     configuration window list to be the current pfWindow the pfPipeWindow
     shall render to.  All the pfChannels attached to the pfPipeWindow will
     automatically be drawn into this current pfWindow.	 See
     pfWindow::setIndex for more details of this operation.
     pfPipeWindow::getIndex will return the current index of the pfPipeWindow.

     pfPipeWindow::setWinType sets the type of a pfPipeWindow where type is an
     or-ed bitmask that may contain the type constants listed below.
     pfPipeWindow::getWinType returns the type of a pfPipeWindow.  A change in
     the type of a pfPipeWindow takes effect upon the call to
     pfPipeWindow::open.  The type of an open pfPipeWindow cannot be changed.
     The pfWindow type attributes all start with PFPWIN_TYPE_ and are:

	  PFPWIN_TYPE_X
	       has identical characteristics to the PFWIN_TYPE_X specification
	       for pfWindows.  See the pfWindow::setType man page for more
	       information.

	  PFPWIN_TYPE_SHARE
	       Specifies that this window should be automatically attached to
	       the first pfPipeWindow on the parent pfPipe.  See the
	       pfWindow::attach man page for more details.

	  PFPWIN_TYPE_STATS
	       has identical characteristics to the PFWIN_TYPE_STATS
	       specification for pfWindows.  See the pfWindow::setType man
	       page for more information.

	  PFPWIN_TYPE_PBUFFER
	       The window drawable will be created in a pbuffer.  For this,
	       you must also specify an GLXFBConfigSGIX with
	       pfPipeWindow::setFBConfig before the window is opened.

	  PFPWIN_TYPE_NOXEVENTS
	       OpenGL Performer will not track X configuration events
	       (resizing, repositioning, etc.) on this window.	This can save
	       a little bit of system overhead so for a deployed, static,
	       real-time flight simulator in "training" mode where every
	       little bit counts, use this.  In development mode, or for
	       interactive applications, you probably want to leave this off.

	  PFPWIN_TYPE_UNMANAGED
	       OpenGL Performer will not do automatic X window management on
	       this window.  This includes size and position tracking,
	       resizing of alternate configuration windows, and swapbuffers.
	       OpenGL Performer will still make the graphics context of this
	       window current if it is open for a pfPipe to render to and has
	       attached pfChannels. pfPipeWindows with drawables that are of
	       type GLXPbufferSGIX or Pixmap are automatically made unmanaged.

     pfPipeWindow::getOrigin returns the cached parent relative origin of the

								       Page 11

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     pfWindow, if open, from the last time the window size was set or an X
     configuration event was detected.	Otherwise it returns the origin and
     size set by pfPipeWindow::setOrigin.

     pfPipeWindow::getSize returns the cached size of the pfWindow, if open,
     from the last time the window size was set or an X configuration event
     was detected. Otherwise it returns the size set by pfPipeWindow::setSize.

     pfPipeWindow::getScreenOrigin returns the cached screen relative origin
     of the pfWindow, if open, from the last time the pfPipeWindow size was
     set or an X configuration event was detected.  Otherwise it returns the
     origin and size set by pfPipeWindow::setOrigin.

     pfPipeWindow::setPVChan sets pfPipeVideoChannel pvchan for the
     pfPipeWindow on which it is invoked based on the index num.
     pfPipeWindow::getPVChan performs the opposite task, returning a pointer
     to the num'th pfPipeVideoChannel of the pfPipeWindow.  The total number
     of pfPipeVideoChannels associated with the pfPipeWindow is returned by
     pfPipeWindow::getNumPVChans.

     pfPipeWindow::addPVChan adds the pfPipeVideoChannel pvchan to a
     pfPipeWindow and returns the resulting index or (-1) if an error was
     encountered. If pvchan has not already been assigned a hardware video
     channel, then the next active hardware video channel after the previous
     pfPipeVideoChannel on the pfPipeWindow will be assigned to the new
     pfPipeVideoChannel.  This assignment can be changed with
     pfPipeVideoChannel::setId.	 pfPipeWindows start out with an initial
     pfPipeVideoChannel that will reference the first active hardware video
     channel.

     pfPipeWindow::removePVChan removes the pfPipeVideoChannel	pvchan from a
     pfPipeWindow using the pfPipeVideoChannel's pointer as search through the
     list, while pfPipeWindow::removePVChanIndex is used to remove the
     pfPipeVideoChannel indexed by num from the pfPipeWindow's
     pfPipeVideoChannel list.

     The index value can be obtained from pfPipeWindow::getPVChanIndex which
     returns the index of pfPipeVideoChannel pvchan.  The opposite action is
     provided by pfPipeWindow::getPVChanId which accepts the argument num and
     returns the pointer to the num'th pfPipeVideoChannel of the indicated
     pfPipeWindow.

     All of the pfPipeVideoChannels associated with a pfPipeWindow can be
     bound with pfPipeWindow::bindPVChans and unbound with
     pfPipeWindow::unbindPVChans.

     pfPipeWindow::getPosPVChan returns the pointer to the pfPipeVideoChannel
     on the pfPipeWindow that contains the screen relative position x, yx.
     This can be useful for getting the pfPipeVideoChannel that contains the
     mouse.

								       Page 12

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     pfPipeWindow::attach will add the windows of the share group of pwin1 to
     that of pwin0.  pfPipeWindow::attachWin will place the pfWindow win in
     the share group of the pfPipeWindow.  pfPipeWindow share groups can
     contain pfWindow so long as the primary group window is a pfPipeWindow.
     This is useful if you want to have a process sproced off the DRAW process
     with a pfWindow and graphics context for creating OpenGL display lists
     and textures shared with the pfPipeWindow of the main drawing process.

     pfPipeWindow::attachSwapGroup will add the windows of the swap group of
     pwin1 to that of pwin0.  pfPipeWindow::attachWinSwapGroup will place the
     pfWindow win in the swap group of the pfPipeWindow.  pfPipeWindow swap
     groups can contain pfWindow so long as the primary group window is a
     pfPipeWindow.  The swap group API is only supported under OpenGL
     operation.	 OpenGL programs can use the PFCHAN_SWAPBUFFERS_HW share token
     with pfChannel share groups to easily and automatically create window
     swap groups.

EXAMPLES
     The following is an example of basic pfPipeWindow creation:

	  { /* in the application process after pfConfig() */
				   pfPipeWindow *pw;
				   pw = new pfPipeWindow(pfGetPipe(0));
				   pw->setName("PipeWin");
				   pw->setOriginSize(0, 0, 500, 500);
				   pw->setWinType(PFPWIN_TYPE_X);
				   pw->open();
				   /* set off the draw process to open window */
				   pfFrame();
	  }

     If special draw process operations are to be done with the opening of the
     window, a pfConfigPWin callback function should be used.

	  {
	       /* in the application process pfPipeWindow init callback */
	       pw->setConfigFunc(OpenPipeWin);
	       /* trigger the draw process to call the config callback
		* for this frame
		*/
	       pw->config();
	  }
	  /* in the draw process pfPipeWindow init callback */
	  void OpenPipeWin(pfPipeWindow *pw)
	  {
	       pw->open();
	       /* do other application specific draw process work,
		* such as downloading scene textures, displaying
		* welcome messages, etc.

								       Page 13

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

	       */
	  }

     The following is an example that shows the creation of multiple
     pfPipeWindows for a single pfPipe and the assignment of pfChannels to the
     different windows:

	  {
	      pfChannel *chan[MAX_CHANS];
	      pfPipeWindow *pwin[MAX_PWINS];
	      pfPipe *p = pfGetPipe(0);

	      for (int loop=0; loop < NumWins; loop++)
	      {
		  pfPipeWindow *pw;
		  char str[PF_MAXSTRING];
		  pwin[loop] = new pfPipeWindow(p);
		  sprintf(str, "OpenGL Performer - Win %d", loop);
		  pwin[loop]->setName(str);
		  pwin[loop]->setOriginSize((loop&0x1)*315, ((loop&0x2)>>1)*340, 300, 300);
	       pwin[loop]->setConfigFunc(OpenPipeWin);
		  pwin[loop]->config();
	      }

	      /* Create and configure a pfChannel for each pfPipeWindow. */
	      for (int loop=0; loop < NumWins; loop++)
	      {
		  chan[loop] = new pfChannel(p);
		  pwin[loop]->addChan(chan[loop]);
	      }

	      /* set off the draw process */
	      pfFrame();
	  }

     pfOpenPWin and pfClosePWin can both be called from the application
     process, or from the draw process.	 The following example demonstrates
     using pfConfigPWin to close a pfPipeWindow:

	  {
	      /* in the application process specify a close config func */
	      pfPWinConfigFunc(pw,ClosePipeWin);
	      pfConfigPWin(pw);

	  }

	  /* in the draw process pfPipeWindow init callback */
	  void ClosePipeWin(pfPipeWindow *pw)

								       Page 14

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

	  {
	      pfClosePWin(pw);
	      /* do other application specific draw process calls */
	  }

     The following example demonstrates using pfConfigPWin to close a
     pfPipeWindow:

	  {
	      /* in the application process specify a close config func */
	      pw->setConfigFunc(ClosePipeWin);
	      pw->config();

	  }

	  /* in the draw process pfPipeWindow init callback */
	  void ClosePipeWin(pfPipeWindow *pw)
	  {
	      pw->close();
	      /* do other application specific draw process calls */
	  }

NOTES
     pfPipeWindows handle the multiprocessing details of OpenGL Performer
     applications for pfWindows. pfPipeWindows must be created in the
     application process.  However, with some minor exceptions, pfPipeWindows
     may be configured, opened, closed, and edited in either the  application
     process or draw process.  Typically, a pfPipeWindow is created and
     configured in the application process.  Custom graphics state is
     initialized in a pfPipeWindow::setConfigFunc callback function.  The
     pfPipeWindow of a channel or a channel's position in a pfPipeWindow list
     may only be modified in the application process.  The specification of
     the current drawing window with pfPipeWindow::select must be done in the
     drawing process.  Explicit specification of the pfGLContext or pfFBConfig
     must be done in the drawing process.  pfPipeWindow queries are also best
     done in the draw process as the query may have to access the graphics
     context to provide the requested information.

     The following table shows from which process pfPipeWindow routines may be

								       Page 15

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

     called.
	     pfPipeWindow routine    Application Process   Draw Process
	    ___________________________________________________________
	    pfNewPWin		     Yes		   No
	    pfPWinAspect	     Yes		   Yes
	    pfPWinConfigFunc	     Yes		   No
	    pfPWinFBConfig	     Yes		   No
	    pfPWinFBConfigAttrs	     Yes		   Yes
	    pfPWinFBConfigData	     No			   Yes
	    pfPWinFBConfigId	     Yes		   Yes
	    pfPWinFullScreen	     Yes		   Yes
	    pfPWinGLCxt		     No			   Yes
	    pfPWinIndex		     Yes		   Yes
	    pfPWinList		     Yes		   Yes
	    pfPWinMode		     Yes		   Yes
	    pfPWinName		     Yes		   Yes
	    pfPWinOrigin	     Yes		   Yes
	    pfPWinOriginSize	     Yes		   Yes
	    pfPWinOverlayWin	     Yes		   Yes
	    pfPWinScreen	     Yes		   Yes
	    pfPWinShare		     Yes		   Yes
	    pfPWinSize		     Yes		   Yes
	    pfPWinStatsWin	     Yes		   Yes
	    pfPWinType		     Yes		   Yes
	    pfPWinWSConnectionName   Yes		   No
	    pfPWinWSDrawable	     Yes		   Yes
	    pfPWinWSWindow	     Yes		   Yes
				   |

							 |

	    pfPipeWindow routine    Application Process	  Draw Process
	    __________________________________________________________
	    pfAttachPWin	    Yes			  Yes
	    pfPWinAddPVChan	    Yes			  Yes
	    pfClosePWin		    Yes			  Yes
	    pfClosePWinGL	    Yes			  Yes
	    pfConfigPWin	    Yes			  Yes
	    pfOpenPWin		    Yes			  Yes
	    pfIsPWinOpen	    Yes			  Yes
	    pfMQueryPWin	    No			  Yes
	    pfQueryPWin		    No			  Yes
	    pfChoosePWinFBConfig    No			  Yes
	    pfSelectPWin	    No			  Yes
	    pfAttachPWinSwapGroup   Yes			  Yes
	    pfPWinSwapBarrier	    Yes			  Yes
	    pfSwapPWinBuffers	    No			  Yes
	    pfGetNumChans	    Yes			  Yes
	    pfAddChan		    Yes			  No
	    pfGetChan		    Yes			  Yes
	    pfInsertChan	    Yes			  No
	    pfMoveChan		    Yes			  No
	    pfRemoveChan	    Yes			  No
				  |

							|

								       Page 16

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

				 |
							|

     Note that whenever any pfObjects are given to a pfPipeWindow, such as
     pfPipeWindow::setWinList, the data must be valid for access by the
     graphics process.	This data, such as pfLists and pfWindows, should
     always be allocated from shared memory.  Structures provided by X, such
     as that returned by pfPipeWindow::chooseFBConfig, or pfChooseFBConfig,
     will not have been allocated in shared memory.  Therefore, those routines
     must be called from the draw process.  Under OpenGL operation,
     pfWindow::setFBConfigId can be used to set the framebuffer configuration
     of an X window in the application process.

     pfPipeWindows support windows in the multiprocessed libpf environment and
     are the glue between pfChannels and pfPipes.  There are times when you
     might want to use pfWindows, instead of pfPipeWindows, even in a libpf
     application.  For example, popping up a simple dialog window in the draw
     process should use pfWindows and not pfPipeWindows.  Additionally, if you
     want to maintain alternate windows with different visual (framebuffer)
     configurations for your pfPipeWindow, you use pfWindows that are
     alternate framebuffer configurations for the base pfPipeWindow.  The
     PFWIN_STATS_WIN, PFWIN_OVERLAY_WIN, and other pfPWinList windows must
     themselves be pfWindows and not pfPipeWindows.  See the pfPWinList
     routine below and the pfWindow man page for more information.

     X Window origin and size:	There are some subtle issues in the management
     of origin and size of X windows.It can be very expensive to immediately
     obtain the current screen relative origin of a window, particularly if
     the window is in a hierarchy.  pfPipeWindows have the size and position
     of the window tracked by the application process. However, it is still
     recommended that user code should not rely on knowning the up to date
     screen relative origin but should be window-coordinate relative to be
     efficient and reliable.

     Gang Swap Swap groups can contain windows from separate pfPipes rendering
     to different graphics pipelines and force that their double-buffering is
     synchronized so that they are guaranteed to always be displaying the same
     frame and have their hardware swapbuffers happen simultaneously. This is
     often referred to as Gang Swap.  For this to work, you must first have
     the graphics pipelines genlocked.	See the genlock(7) man page for more
     informations.  Next, you must connect the proper cable between the
     SwapReady connectors on the graphics pipelines.  On the InfiniteReality
     this is a simple BNC cable of any Ohms.

BUGS
     pfPipeWindows cannot be deleted.

     Detach from share groups and swap groups is not supported.

								       Page 17

pfPipeWindow(3pf)	      OpenGL Performer 3.2.2 libpf C++ Reference Pages

SEE ALSO
     pfChannel, pfPipe, pfWindow, pfGetCurWSConnection, genlock,
     XGetVisualInfo, XVisualIDFromVisual

								       Page 18

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net