Re: [info-performer] Multipipe Initialization

Date view Thread view Subject view Author view

From: Christopher D. Johnson (cubicwts++at++excite.com)
Date: 10/06/2005 11:01:20


Jason-

I am going to take a step back from my "multiscreen" view and see about attacking the problem with one "screen" covering both LCD displays, ie setting up my system with one "screen" instead of 2..

So far I have one pipe, with two windows attached to it and channels set in the windows. I have noticed that when I created the 2nd window, what gets displayed in each window now looks "funky", with colors being off and some things not showing up or updating. What else needs to be done to get 2 windows to "play nice"? I've read about pfPWinShare() and the associated funcitons but don't have an example of how configuring, framebuffering, and relying on calls to pfFrame() should be set up. I suspect that may be my problem.

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();
   }
   
   //pfPWinScreen(mttGlobal->pwinLOWER,0);
   /*pfPWinScreen(mttGlobal->pwinLOWER,1);*/
   
   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,
      500,
      500);
   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
}

Christopher D. Johnson
AV-8B Harrier II Simulators
ISEO Support Team
Cherry Point, NC
252-466-4542
252-466-4538

 --- On Thu 10/06, Jason Daly < jdaly++at++ist.ucf.edu > wrote:
From: Jason Daly [mailto: jdaly++at++ist.ucf.edu]
To: jdaly++at++ist.ucf.edu
     Cc: cubicwts++at++excite.com, info-performer++at++sgi.com
Date: Thu, 06 Oct 2005 12:08:07 -0400
Subject: Re: [info-performer] Multipipe Initialization

Jason Daly wrote:<br><br>> Christopher D. Johnson wrote:<br>><br>>> here are the results I get running glxinfo:<br>>> <br>>><br>><br>> Hmm, I'm a little confused now. According to the NVIDIA driver <br>> documentation, the second screen in a two-screen setup from one card <br>> is not supposed to support GLX, yet clearly glxinfo says that you have <br>> full support on both screens.<br><br><br>OK, I'm less confused now. Turns out that I misread the README. You <br>can in fact have hardware OpenGL on both screens. It just can't span <br>both screens as it can in TwinView.<br><br><br>-- <br><br>--"J"<br><br>"I'm a castaway stranded in a desolate land,<br> I can see the footprints in the virtual sand."<br> --Neil Peart<br><br>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Oct 06 2005 - 11:01:38 PDT