Re: [info-performer] Multipipe Initialization

Date view Thread view Subject view Author view

From: Paolo Farinelli (paolo++at++sgi.com)
Date: 10/07/2005 09:36:07


Hi Christopher,

even though configuring your system as a single X-screen may
well be your best option, I would still be interested to know
whether perfly can handle your dual X-screen configuration.

Please set PFNFYLEVEL to 8 and try running perfly. If it does
not work, it would be helpful if you could send me the output.

Thank you.
Regards,
Paolo

On Fri, 7 Oct 2005 10:11:51 -0400 (EDT), Christopher D. Johnson
<cubicwts++at++excite.com> wrote:

>
> I have at least gotten a version of my code working that initializes
> using 1 pipe, 2 windows, and the lower screen. I am wondering that,
> since I have this working, should I just reconfigure my system to see
> both screens as one "screen", as this seems to be giving me the results
> I want when I experimented on the lower LCD only and left the upper LCD
> out of the equation. Do any of you know if once I go the "one screen
> over 2 LCDs" route if my calls for glRasterPositions that will be in the
> "lower" window will be affected by the "one-screen" system change, ie,
> are calls of that nature window relative or screen relative? Technically
> my "screen" will now be twice as big as before but my windows will still
> be positioned so that they appear on the proper LCD.
>
> Here is how I'm getting it to work as 2 windows, one pipe, one screen.
> I'm leaving the upper LCD out of the equation until the system is
> reconfigured to see both LCD's as one "screen". Can any of you direct me
> to any good documentation as to how to get that accomplished in a Fedore
> Core 3 environment?
>
>
> 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(1);
>
> // 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 LOWER (pfPipe *)!\n");
> abort();
> }
> /*mttGlobal->gfxPipeUPPER = pfGetPipe(1);
> if (!(mttGlobal->gfxPipeUPPER)) {
> fprintf(stderr, "ERROR: Unable to initialize UPPER (pfPipe *)!\n");
> abort();
> }*/
> pfPipeScreen(mttGlobal->gfxPipeLOWER,0);
> /*pfPipeScreen(mttGlobal->gfxPipeUPPER,1);*/
> mttGlobal->pwinLOWER = pfNewPWin(mttGlobal->gfxPipeLOWER);
> if (!(mttGlobal->pwinLOWER)) {
> fprintf(stderr, "ERROR: Unable to initialize LOWER(pfWindow
> *)!\n");
> abort();
> }
> mttGlobal->pwinUPPER = pfNewPWin(mttGlobal->gfxPipeLOWER);
> if (!(mttGlobal->pwinUPPER)) {
> fprintf(stderr, "ERROR: Unable to initialize UPPER(pfWindow
> *)!\n");
> abort();
> }
> pfPWinShare(mttGlobal->pwinLOWER,PFWIN_SHARE_GL_OBJS);
> pfPWinShare(mttGlobal->pwinUPPER,PFWIN_SHARE_GL_OBJS);
> pfAttachPWin(mttGlobal->pwinLOWER,mttGlobal->pwinUPPER);
> 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);
> 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);
> pfOpenPWin(mttGlobal->pwinUPPER);
> /* set off the draw process to open windows and call init callbacks */
> pfFrame();
> sleep(3);
> pfPWinFullScreen( mttGlobal->pwinLOWER );
> pfPWinFullScreen( mttGlobal->pwinUPPER );
> dsp = mttGlobal->dsp = pfGetCurWSConnection();
> mttGlobal->winLOWER = pfGetPWinWSWindow(mttGlobal->pwinLOWER);
> XSelectInput(mttGlobal->dsp,mttGlobal->winLOWER,KeyPressMask |
> ButtonPressMask );
> XMapWindow(mttGlobal->dsp,mttGlobal->winLOWER);
> XSync(mttGlobal->dsp,FALSE);
>
> /*------------------------------------------------------
> * Remove cursor arrow.
> *-----------------------------------------------------*/
> #ifndef TESTMTT
> pfuLoadPWinCursor(mttGlobal->pwinLOWER, PFU_CURSOR_OFF);
> #endif
> }
>

-- 
Paolo Farinelli <paolo++at++sgi.com>
OpenGL|Performer - Silicon Graphics Inc.


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Oct 07 2005 - 09:37:03 PDT