From: Christopher D. Johnson (cubicwts++at++excite.com)
Date: 10/05/2005 15:35:51
As an aside, the OS I am using is Red Hat Fedore Core 3. Forgot to mention that in my previous email.
Christopher D. Johnson
AV-8B Harrier II Simulators
ISEO Support Team
Cherry Point, NC
252-466-4542
252-466-4538
--- On Wed 10/05, Stace Peterson < stacep++at++sgi.com > wrote:
From: Stace Peterson [mailto: stacep++at++sgi.com]
To: cubicwts++at++excite.com
Cc: info-performer++at++sgi.com
Date: Wed, 05 Oct 2005 13:22:35 -0700
Subject: Re: [info-performer] Multipipe Initialization
Hi,<br><br>Gordon's comment is probably correct. If the system has a single<br>graphics card, then you should only be creating one pfPipe. The notice<br>you reported is usually not a meaningful one, unless you are directly<br>calling pfChooseFBConfig in your application with constraints which may<br>not be achievable. For most multi-screen PC setups, the single card<br>treats the combined screen as a single desktop, and thus you will want<br>to use either 2 windows with 2 channels, or 1 window with 2 channels on<br>a single pipe.<br><br>Hope this helps,<br>Stace <br><br>"Christopher D. Johnson" wrote:<br>> <br>> Greetings all. I have a simulation program running on a dual processor PC. There is an upper and a lower LCD display, with the lower LCD being a touch screen. The lower screen is "display 0" while the upper screen is "display 1".<br>> <br>> What I am trying unsuccessfully to do is initialize performer so that I have 2 pfPipes created (one for each display) and
_______________________________________________
This archive was generated by hypermail 2b29
: Wed Oct 05 2005 - 15:36:10 PDT
each pfPipe has just a single pfPipeWindow attached to it. Everything initializes seemingly fine until I call pfFrame() for the first time, at which time I see my full screen windows created (blank) on the uper and lower display, and then it bombs out (the screens disappear) and I get the following notice:<br>> <br>> "PF Notice: pfChooseFBConfig: failed to make configuration matching specified attributes"<br>> <br>> Below that I get a "BadWindow" message as my X calls try to operate on the lower window created. Simply going back to one pipe, one window runs fine. Here are the functions I am using to initialize performer and initialize the pfPipes and pfPipeWindows. I've looked in the Performer manual and tried to set the pipes and windows up to work properly, but obviously I am missing something. Any clues?<br>> <br>> static void<br>> initPerformer(void)<br>> {<br>> void *arena = NULL;<br>> pfSharedArenaSize(134217728); /* 128 * 1024 * 1024 = 128 Mb */<br>> //
pfSharedArenaSize(167772160); /* 160 * 1024 * 1024 = 128 Mb */<br>> // pfSharedArenaSize(268435456); /* 256 * 1024 * 1024 = 256 Mb */<br>> pfInit();<br>> arena = pfGetSharedArena();<br>> <br>> /* Allocate Global Variables */<br>> mttGlobal = pfMalloc(sizeof(global_t), arena);<br>> MttGfx = pfMalloc(sizeof( MTTGFX ), arena);<br>> c_ = pfMalloc(sizeof( struct ForCComm ), arena);<br>> ntReq = pfMalloc(sizeof(NTREQ), arena);<br>> <br>> Client = pfMalloc(sizeof( CLIENT ), arena);<br>> BBoxTerrain = pfMalloc(sizeof ( pfBox ), arena);<br>> <br>> /* initialize global values */<br>> initGlobal();<br>> <br>> /*------------------------------------------------------<br>> * Initialize main Gfx variables.<br>> *-----------------------------------------------------*/<br>> initGfx();<br>> readConfigFile();<br>> <br>> // pfMultiprocess(PFMP_DEFAULT);<br>>
pfMultiprocess(PFMP_FORK_DBASE | PFMP_FORK_LPOINT);<br>> pfMultipipe(2);<br>> <br>> // scb - uncommented Multithread(...)<br>> /* pfMultithread(0, PFPROC_CULL, 2); */<br>> <br>> pfdInitConverter("flt");<br>> pfConfig();<br>> pfFilePath( "../data/");<br>> pfNotifyLevel(PFNFY_FATAL);<br>> #ifdef GFXAUTOSYNC<br>> pfFrameRate(MttGfx->FrameRate);<br>> pfPhase(PFPHASE_LOCK);<br>> #endif<br>> }<br>> <br>> static void OpenPipeWin(pfPipeWindow *pwin)<br>> {<br>> pfOpenPWin(pwin);<br>> }<br>> <br>> static void<br>> initPipeWindow(void)<br>> {<br>> int constraints[] = {<br>> PFFB_DOUBLEBUFFER,<br>> PFFB_RGBA,<br>> PFFB_RED_SIZE, 5,<br>> PFFB_GREEN_SIZE, 5,<br>> PFFB_BLUE_SIZE, 5,<br>> <br>> PFFB_ALPHA_SIZE, 1,<br>> PFFB_STENCIL_SIZE, 8,<br>> PFFB_DEPTH_SIZE, 15,<br>> (int)NULL<br>> };<br>> /*------------------------------------------------------<br>> * Configure graphics
pipeline.<br>> *-----------------------------------------------------*/<br>> mttGlobal->gfxPipeLOWER = pfGetPipe(0);<br>> if (!(mttGlobal->gfxPipeLOWER)) {<br>> fprintf(stderr, "ERROR: Unable to initialize (pfPipe *) LOWER!\n");<br>> abort();<br>> }<br>> mttGlobal->gfxPipeUPPER = pfGetPipe(1);<br>> if (!(mttGlobal->gfxPipeUPPER)) {<br>> fprintf(stderr, "ERROR: Unable to initialize (pfPipe *) UPPER!\n");<br>> abort();<br>> }<br>> <br>> pfPipeScreen(mttGlobal->gfxPipeLOWER,0);<br>> pfPipeScreen(mttGlobal->gfxPipeUPPER,1);<br>> <br>> mttGlobal->pwinLOWER = pfNewPWin(mttGlobal->gfxPipeLOWER);<br>> if (!(mttGlobal->pwinLOWER)) {<br>> fprintf(stderr, "ERROR: Unable to initialize (pfWindow *) LOWER!\n");<br>> abort();<br>> }<br>> mttGlobal->pwinUPPER = pfNewPWin(mttGlobal->gfxPipeUPPER);<br>> if (!(mttGlobal->pwinUPPER)) {<br>> fprintf(stderr, "ERROR: Unable to initialize (pfWindow *)
UPPER!\n");<br>> abort();<br>> }<br>> <br>> pfPWinName(mttGlobal->pwinLOWER,MttGfx->ScreenLOWER.Name);<br>> pfPWinType(mttGlobal->pwinLOWER, PFWIN_TYPE_X);<br>> pfPWinMode( mttGlobal->pwinLOWER, PFWIN_NOBORDER, 1);<br>> pfPWinConfigFunc( mttGlobal->pwinLOWER, OpenPipeWin);<br>> pfChoosePWinFBConfig( mttGlobal->pwinLOWER, constraints);<br>> pfConfigPWin( mttGlobal->pwinLOWER );<br>> pfPWinOriginSize(mttGlobal->pwinLOWER, 0, 0,<br>> MttGfx->ScreenLOWER.SizeW,<br>> MttGfx->ScreenLOWER.SizeH);<br>> //pfPWinScreen(mttGlobal->pwinLOWER,0);<br>> pfOpenPWin(mttGlobal->pwinLOWER);<br>> <br>> pfPWinName(mttGlobal->pwinUPPER,MttGfx->ScreenUPPER.Name);<br>> pfPWinType(mttGlobal->pwinUPPER, PFWIN_TYPE_X);<br>> pfPWinMode( mttGlobal->pwinUPPER, PFWIN_NOBORDER, 1);<br>> pfPWinConfigFunc( mttGlobal->pwinUPPER, OpenPipeWin);<br>> pfChoosePWinFBConfig( mttGlobal->pwinUPPER, constraints);<br>> pfConfigPWin( mttGlobal->pwinUPPER
);<br>> pfPWinOriginSize(mttGlobal->pwinUPPER, 0, 0,<br>> MttGfx->ScreenUPPER.SizeW,<br>> MttGfx->ScreenUPPER.SizeH);<br>> //pfPWinScreen(mttGlobal->pwinLOWER,1);<br>> pfOpenPWin(mttGlobal->pwinUPPER);<br>> <br>> /* set off the draw process to open windows and call init callbacks */<br>> pfFrame();<br>> <br>> sleep(3);<br>> <br>> pfPWinFullScreen( mttGlobal->pwinLOWER );<br>> pfPWinFullScreen( mttGlobal->pwinUPPER );<br>> <br>> mttGlobal->dspLOWER = pfGetCurWSConnection();<br>> <br>> // Logic To Set Up Catching Of X-Events on the lower touch screen<br>> mttGlobal->winLOWER = pfGetPWinWSWindow(mttGlobal->pwinLOWER);<br>> XSelectInput(mttGlobal->dspLOWER,mttGlobal->winLOWER,KeyPressMask | ButtonPressMask );<br>> XMapWindow(mttGlobal->dspLOWER,mttGlobal->winLOWER);<br>> XSync(mttGlobal->dspLOWER,FALSE);<br>> <br>> /*------------------------------------------------------<br>> * Remove cursor arrow.<br>>
*-----------------------------------------------------*/<br>> #ifndef TESTMTT<br>> pfuLoadPWinCursor(mttGlobal->pwinLOWER, PFU_CURSOR_OFF);<br>> #endif<br>> }<br>> <br>> Christopher D. Johnson<br>> AV-8B Harrier II Simulators<br>> ISEO Support Team<br>> Cherry Point, NC<br>> 252-466-4542<br>> 252-466-4538<br>> <br>> _______________________________________________<br>> Join Excite! - http://www.excite.com
>> The most personalized portal on the Web!<br>> <br>> -----------------------------------------------------------------------<br>> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
>> Open Development Project: http://oss.sgi.com/projects/performer/
>> Submissions: info-performer++at++sgi.com<br>> Admin. requests: info-performer-request++at++sgi.com<br>> -----------------------------------------------------------------------<br><br>-- <br>------------------------------------------------------------------<br>Stace Peterson
stacep++at++sgi.com<br>Silicon Graphics, Inc. (650) 933-2323<br>
Join Excite! - http://www.excite.com
The most personalized portal on the Web!