From: Stace Peterson (stacep++at++sgi.com)
Date: 10/05/2005 13:22:35
Hi,
Gordon's comment is probably correct. If the system has a single
graphics card, then you should only be creating one pfPipe. The notice
you reported is usually not a meaningful one, unless you are directly
calling pfChooseFBConfig in your application with constraints which may
not be achievable. For most multi-screen PC setups, the single card
treats the combined screen as a single desktop, and thus you will want
to use either 2 windows with 2 channels, or 1 window with 2 channels on
a single pipe.
Hope this helps,
Stace
"Christopher D. Johnson" wrote:
>
> 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".
>
> What I am trying unsuccessfully to do is initialize performer so that I have 2 pfPipes created (one for each display) and 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:
>
> "PF Notice: pfChooseFBConfig: failed to make configuration matching specified attributes"
>
> 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?
>
> static void
> initPerformer(void)
> {
> void *arena = NULL;
> pfSharedArenaSize(134217728); /* 128 * 1024 * 1024 = 128 Mb */
> // pfSharedArenaSize(167772160); /* 160 * 1024 * 1024 = 128 Mb */
> // pfSharedArenaSize(268435456); /* 256 * 1024 * 1024 = 256 Mb */
> pfInit();
> arena = pfGetSharedArena();
>
> /* Allocate Global Variables */
> mttGlobal = pfMalloc(sizeof(global_t), arena);
> MttGfx = pfMalloc(sizeof( MTTGFX ), arena);
> c_ = pfMalloc(sizeof( struct ForCComm ), arena);
> ntReq = pfMalloc(sizeof(NTREQ), arena);
>
> Client = pfMalloc(sizeof( CLIENT ), arena);
> BBoxTerrain = pfMalloc(sizeof ( pfBox ), arena);
>
> /* initialize global values */
> initGlobal();
>
> /*------------------------------------------------------
> * Initialize main Gfx variables.
> *-----------------------------------------------------*/
> initGfx();
> readConfigFile();
>
> // pfMultiprocess(PFMP_DEFAULT);
> pfMultiprocess(PFMP_FORK_DBASE | PFMP_FORK_LPOINT);
> pfMultipipe(2);
>
> // scb - uncommented Multithread(...)
> /* pfMultithread(0, PFPROC_CULL, 2); */
>
> pfdInitConverter("flt");
> pfConfig();
> pfFilePath( "../data/");
> pfNotifyLevel(PFNFY_FATAL);
> #ifdef GFXAUTOSYNC
> pfFrameRate(MttGfx->FrameRate);
> pfPhase(PFPHASE_LOCK);
> #endif
> }
>
> static void OpenPipeWin(pfPipeWindow *pwin)
> {
> pfOpenPWin(pwin);
> }
>
> static void
> initPipeWindow(void)
> {
> int constraints[] = {
> PFFB_DOUBLEBUFFER,
> PFFB_RGBA,
> PFFB_RED_SIZE, 5,
> PFFB_GREEN_SIZE, 5,
> PFFB_BLUE_SIZE, 5,
>
> PFFB_ALPHA_SIZE, 1,
> PFFB_STENCIL_SIZE, 8,
> PFFB_DEPTH_SIZE, 15,
> (int)NULL
> };
> /*------------------------------------------------------
> * Configure graphics pipeline.
> *-----------------------------------------------------*/
> mttGlobal->gfxPipeLOWER = pfGetPipe(0);
> if (!(mttGlobal->gfxPipeLOWER)) {
> fprintf(stderr, "ERROR: Unable to initialize (pfPipe *) LOWER!\n");
> abort();
> }
> mttGlobal->gfxPipeUPPER = pfGetPipe(1);
> if (!(mttGlobal->gfxPipeUPPER)) {
> fprintf(stderr, "ERROR: Unable to initialize (pfPipe *) UPPER!\n");
> abort();
> }
>
> pfPipeScreen(mttGlobal->gfxPipeLOWER,0);
> pfPipeScreen(mttGlobal->gfxPipeUPPER,1);
>
> mttGlobal->pwinLOWER = pfNewPWin(mttGlobal->gfxPipeLOWER);
> if (!(mttGlobal->pwinLOWER)) {
> fprintf(stderr, "ERROR: Unable to initialize (pfWindow *) LOWER!\n");
> abort();
> }
> mttGlobal->pwinUPPER = pfNewPWin(mttGlobal->gfxPipeUPPER);
> if (!(mttGlobal->pwinUPPER)) {
> fprintf(stderr, "ERROR: Unable to initialize (pfWindow *) UPPER!\n");
> abort();
> }
>
> pfPWinName(mttGlobal->pwinLOWER,MttGfx->ScreenLOWER.Name);
> pfPWinType(mttGlobal->pwinLOWER, PFWIN_TYPE_X);
> pfPWinMode( mttGlobal->pwinLOWER, PFWIN_NOBORDER, 1);
> pfPWinConfigFunc( mttGlobal->pwinLOWER, OpenPipeWin);
> pfChoosePWinFBConfig( mttGlobal->pwinLOWER, constraints);
> pfConfigPWin( mttGlobal->pwinLOWER );
> pfPWinOriginSize(mttGlobal->pwinLOWER, 0, 0,
> MttGfx->ScreenLOWER.SizeW,
> MttGfx->ScreenLOWER.SizeH);
> //pfPWinScreen(mttGlobal->pwinLOWER,0);
> pfOpenPWin(mttGlobal->pwinLOWER);
>
> pfPWinName(mttGlobal->pwinUPPER,MttGfx->ScreenUPPER.Name);
> pfPWinType(mttGlobal->pwinUPPER, PFWIN_TYPE_X);
> pfPWinMode( mttGlobal->pwinUPPER, PFWIN_NOBORDER, 1);
> pfPWinConfigFunc( mttGlobal->pwinUPPER, OpenPipeWin);
> pfChoosePWinFBConfig( mttGlobal->pwinUPPER, constraints);
> pfConfigPWin( mttGlobal->pwinUPPER );
> pfPWinOriginSize(mttGlobal->pwinUPPER, 0, 0,
> MttGfx->ScreenUPPER.SizeW,
> MttGfx->ScreenUPPER.SizeH);
> //pfPWinScreen(mttGlobal->pwinLOWER,1);
> pfOpenPWin(mttGlobal->pwinUPPER);
>
> /* set off the draw process to open windows and call init callbacks */
> pfFrame();
>
> sleep(3);
>
> pfPWinFullScreen( mttGlobal->pwinLOWER );
> pfPWinFullScreen( mttGlobal->pwinUPPER );
>
> mttGlobal->dspLOWER = pfGetCurWSConnection();
>
> // Logic To Set Up Catching Of X-Events on the lower touch screen
> mttGlobal->winLOWER = pfGetPWinWSWindow(mttGlobal->pwinLOWER);
> XSelectInput(mttGlobal->dspLOWER,mttGlobal->winLOWER,KeyPressMask | ButtonPressMask );
> XMapWindow(mttGlobal->dspLOWER,mttGlobal->winLOWER);
> XSync(mttGlobal->dspLOWER,FALSE);
>
> /*------------------------------------------------------
> * Remove cursor arrow.
> *-----------------------------------------------------*/
> #ifndef TESTMTT
> pfuLoadPWinCursor(mttGlobal->pwinLOWER, PFU_CURSOR_OFF);
> #endif
> }
>
> Christopher D. Johnson
> AV-8B Harrier II Simulators
> ISEO Support Team
> Cherry Point, NC
> 252-466-4542
> 252-466-4538
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
>
> -----------------------------------------------------------------------
> 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
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
-- ------------------------------------------------------------------ Stace Peterson stacep++at++sgi.com Silicon Graphics, Inc. (650) 933-2323
This archive was generated by hypermail 2b29 : Wed Oct 05 2005 - 13:22:46 PDT