From: Christopher D. Johnson (cubicwts++at++excite.com)
Date: 10/06/2005 08:18:44
Actually, I am catching x-events so that I can detect "mouse events" when someone touches the lower LCD touch-screen. The window I am creating for the lower screen does not show any mouse pointer but it does have "buttons" on it that can be pressed.
Christopher D. Johnson
AV-8B Harrier II Simulators
ISEO Support Team
Cherry Point, NC
252-466-4542
252-466-4538
--- On Thu 10/06, Rick van Haasen < rick.van.haasen++at++philips.com > wrote:
From: Rick van Haasen [mailto: rick.van.haasen++at++philips.com]
To: cubicwts++at++excite.com
Date: Thu, 6 Oct 2005 12:51:55 +0200
Subject: Re: [info-performer] Multipipe Initialization
Hi Christopher,<br><br>why is it that you use these routines for the getting the x-connection?<br>is it for getting the keyboard events? in that case its easier to use<br>functions from pfu, in that case you don't have to do with any X-specific <br>stuff.<br><br>#include <Performer/pfu.h><br><br>pfuEventStream g_events;<br><br>main() {<br> pfInit()<br> pfuInit()<br> while(handleEvents()) {<br> pfFrame()<br>}<br>}<br>// Handle keyboard events<br>//<br>bool handleEvents() {<br> pfuGetEvents(&g_events);<br> pfuEventStream* pEvents = &g_events;<br> bool cont=true;<br><br> int numDevs = pEvents->numDevs;<br> for (int j=0 ; j<numDevs ; j++) {<br> int dev = pEvents->devQ[j];<br> int val = pEvents->devVal[j];<br><br> if (pEvents->devCount[dev] > 0) {<br> switch (dev) {<br> case PFUDEV_REDRAW:<br> pEvents->devCount[dev]=0;<br> break;<br> case PFUDEV_WINQUIT:<br> pEvents->devCount[dev]=0;<br> break;<br> case
_______________________________________________
This archive was generated by hypermail 2b29
: Thu Oct 06 2005 - 08:19:01 PDT
PFUDEV_KEYBD:<br> for (int i=0 ; i<pEvents->numKeys; ++i ) {<br> int key = pEvents->keyQ[i];<br> if ( pEvents->keyCount[key] ) {<br> switch ( key ) {<br> case 27: // exit if 'esc' is pressed<br> cont = false;<br> break;<br> default:<br> break;<br> }<br> }<br> }<br> pEvents->devCount[dev] = 0;<br> break;<br> }<br> }<br> }<br> return cont;<br>} <br><br>Or do you have another reason to specify the server as you are doing?<br><br>Rick<br><br><br><br><br><br><br><br><br>"Christopher D. Johnson" <cubicwts++at++excite.com> <br>2005-10-05 19:54<br>Please respond to<br>cubicwts++at++excite.com<br><br><br>To<br>Rick van Haasen/EHV/RESEARCH/PHILIPS++at++PHILIPS<br>cc<br><br>Subject<br>Re: [info-performer] Multipipe Initialization<br>Classification<br><br><br><br><br><br><br><br><br>Rick-<br><br>Something that is stumping me and may be related to my problem
is that I <br>am trying to get the XServer connection in the following way:<br><br>static void <br>InitXInput()<br>{<br> /* wait for X Window to exist in Performer shared memory */<br> if (mttGlobal->winLOWER = pfGetPWinWSWindow(mttGlobal->pwinLOWER))<br> {<br> XSelectInput(mttGlobal->dsp,mttGlobal->winLOWER,KeyPressMask | <br>ButtonPressMask );<br> XMapWindow(mttGlobal->dsp,mttGlobal->winLOWER);<br> XFlush(mttGlobal->dsp);<br> }<br>}<br><br>.<br>.<br>.<br>mttGlobal->dsp = pfGetCurWSConnection();<br>InitXInput();<br>.<br>.<br>.<br><br>where mttGlobal->dsp is declared as follows:<br>"pfWSConnection *dsp;"<br><br>From reading the manual I gather that the call to pfGetCurWSConnection() <br>is supposed to return a pointer of type "pfWSConnection". But when I <br>compile I get warnings on the "mttGlobal->dsp = pfGetCurWSConnection();" <br>line as well as XSelectInput, XMapWindow, and XFlush warning of an <br>incompatable pointer
type. Why would it complain about "mttGlobal->dsp = <br>pfGetCurWSConnection();"? And how can I convert the mttGlobal->dsp from a <br>pfWSConnection to a Display connection? Seems the manual is saying one <br>thing and I'm getting something else. <stumped><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> --- On Wed 10/05, Rick van Haasen < rick.van.haasen++at++philips.com > wrote:<br>From: Rick van Haasen [mailto: rick.van.haasen++at++philips.com]<br>To: cubicwts++at++excite.com<br>Date: Wed, 5 Oct 2005 15:49:23 +0200<br>Subject: Re: [info-performer] Multipipe Initialization<br><br>you are right, i get this warning, but after that the application <br><br>continues, running fullscreen <br>on all 4 monitors.<br>Sometimes <br>however the application seriously drops framerate, i haven't <br><br>found<br>why, this can be a problem in my application, maybe something <br>else.<br><br>Anyway, the
application runs without crashing. I don't think <br>the warning <br>is fatal......<br><br>I just started another project, my <br>code is at this stage just "basic setup <br>stuff and calling<br>while (1) <br>pfFrame;"<br><br>I get the warning, next the application shows a black <br>screen as expected.<br><br>Does (on your system) such a "minimal code" <br>crash the after the <br>warning?<br><br>Rick.<br><br><br><br><br><br><br><br><br>"Christopher D. <br>Johnson" <cubicwts++at++excite.com> <br>2005-10-05 15:32<br>Please respond <br>to<br>cubicwts++at++excite.com<br><br><br>To<br>Rick van <br>Haasen/EHV/RESEARCH/PHILIPS++at++PHILIPS<br>cc<br><br>Subject<br>Re: <br>[info-performer] Multipipe <br>Initialization<br>Classification<br><br><br><br><br><br><br><br><br>Wow, <br>so you are getting that message and your pfPipeWindows are still <br><br>coming up properly? I have been so focused on getting my x calls to <br>find <br>the lower window properly (that's the portion of the program that
<br> is <br>causing the application to bomb and exit) I haven't taken the x <br>calls out <br>to see if the windows are running properly once I get to m y <br>main <br>graphical loop.<br><br>So you say y our windows are "working" <br>even though Performer give you the <br>"PF Notice: pfChooseFBConfig: <br>failed to make configuration mathcing <br><br>specified attributes" <br>notice?<br><br><br>Christopher D. Johnson<br>AV-8B Harrier II <br>Simulators<br>ISEO Support Team<br>Cherry Point, <br>NC<br>252-466-4542<br>252-466-4538<br><br> --- On Wed 10/05, Rick van <br>Haasen < rick.van.haasen++at++philips.com > wrote:<br>From: Rick van Haasen <br>[mailto: rick.van.haasen++at++philips.com]<br>To: <br>rick.van.haasen++at++philips.com<br> Cc: <br>cubicwts++at++excite.com, info-performer++at++sgi.com, <br><br>owner-info-performer++at++performer.engr.sgi.com<br>Date: Wed, 5 Oct 2005 <br>14:54:24 +0200<br>Subject: Re: [info-performer] Multipipe <br>Initialization<br><br>Hi,<br><br>i have to come back on my
previous <br>findings: the issue is NOT <br>solved by <br>explicitely setting the <br>visualId's !<br>most likely i missed <br>the warning message (the <br>application outputs much of <br>info on the <br>console)<br>So i do get <br>the warning/notice:<br><br>PF Notice: <br>pfChooseFBConfig: failed to make <br>configuration mathcing <br>specified <br>attributes.<br><br>sorry for the <br>misleading info in my previous reply.... <br><br>:-(<br><br>Rick.<br><br><br><br><br><br><br><br><br><br>Rick van <br>Haasen <br><rick.van.haasen+FromInternet++at++philips.com> <br>Sent <br><br>by:<br>owner-info-performer++at++performer.engr.sgi.com<br>2005-10-04 <br><br>14:28<br>Please respond to<br>Rick van <br><br>Haasen/EHV/RESEARCH/PHILIPS++at++PHILIPS<br><br><br>To<br>cubicwts++at++excite.com<br>cc<br>info-performer++at++sgi.com<br>owner-info-performer++at++performer.engr.sgi.com<br>Subject<br>Re: <br><br>[info-performer] Multipipe <br><br>Initialization<br>Classification<br><br><br><br><br><br><br><br>Hi,<br><br>I
<br><br>had more or less the same situation with 4 screens (2 graphics <br><br>cards, <br>each card using 2 monitors, using twinview on each card, <br><br>effectively using<br>2 "x-screens" where each screen covers 2 <br><br>monitors).<br><br>I found out that the message has to to with the fact <br><br>that each x-screen <br>uses different visual id's for effectively the <br>same <br>visual: if you run <br>glxinfo you can verify this.<br>So if <br>performer <br>first determines a visual-id on 1 screen, and then tries <br><br>to use this <br>id to create the visuals on both screens it will fail <br>on 1 of <br>the <br>other screen.<br>I verified this by explicitely <br>requesting the <br><br>visual:<br><br>pViewer->getPipe(0)->getPWin(0)->setVisualId(0x47); // <br><br>pViewer is a <br>pointer to pfvViewer <br><br><br>pViewer->getPipe(1)->getPWin(0)->setVisualId(0x16a); <br><br><br><br>.......blabla<br><br>pViewer->config();<br><br><br>(In this <br>system <br>i use 2 nvidia
quadro fx1400 cards, using the latest <br><br><br>drivers)<br><br>this way i didn't get the warning anymore.<br>So <br>it <br>seems like a Performer issue to <br><br>me.....<br><br><br>Rick.<br><br><br><br><br><br><br><br><br>"Christopher <br><br>D. Johnson" <cubicwts++at++excite.com> <br>Sent <br><br>by:<br>owner-info-performer++at++performer.engr.sgi.com<br>2005-10-03 <br><br>20:31<br>Please respond <br><br>to<br>cubicwts++at++excite.com<br><br><br>To<br>info-performer++at++sgi.com<br>cc<br><br>Subject<br>[info-performer] <br><br>Multipipe <br><br>Initialization<br>Classification<br><br><br><br><br><br><br><br><br>Greetings <br><br>all. I have a simulation program running on a dual processor PC. <br><br><br><br>There is an upper and a lower LCD display, with the <br>lower LCD <br>being a <br>touch screen. The lower screen is "display 0" <br>while the upper <br>screen is <br>"display 1".<br><br>What I am trying <br>unsuccessfully to do is <br>initialize performer so that I <br>have 2
<br>pfPipes created (one for each <br>display) and each pfPipe has just a <br><br>single pfPipeWindow attached to <br>it. Everything initializes <br>seemingly fine <br>until I call pfFrame() for <br>the first time, at which <br>time I see my full <br>screen windows created <br>(blank) on the <br>uper <br>and lower display, and then it <br>bombs out (the screens disappear) <br><br>and I get the following notice:<br><br>"PF Notice: pfChooseFBConfig: <br><br>failed to make configuration matching <br>specified <br><br>attributes"<br><br>Below that I get a "BadWindow" message as my X <br>calls <br>try to operate on the <br><br>lower window created. Simply going <br>back to <br>one pipe, one window runs fine. <br><br>Here are the functions <br>I am using <br>to initialize performer and initialize <br>the pfPipes and<br> <br>pfPipeWindows. <br>I've looked in the Performer manual and <br>tried to <br>set the pipes and <br>windows up to work properly, but obviously I am
<br><br><br>missing something. <br>Any <br>clues?<br><br><br><br><br><br><br><br>static <br><br>void<br>initPerformer(void)<br>{<br> void *arena = NULL;<br> <br><br>pfSharedArenaSize(134217728); /* 128 * 1024 * 1024 = 128 Mb */<br> // <br><br>pfSharedArenaSize(167772160); /* 160 * 1024 * 1024 = 128 Mb */<br> // <br><br>pfSharedArenaSize(268435456); /* 256 * 1024 * 1024 = 256 Mb */<br> <br><br>pfInit();<br> arena = <br>pfGetSharedArena();<br><br> /* Allocate <br>Global Variables */<br> <br>mttGlobal = pfMalloc(sizeof(global_t), <br>arena);<br> MttGfx = <br>pfMalloc(sizeof( MTTGFX ), arena);<br> c_ <br> = <br>pfMalloc(sizeof( struct ForCComm ), arena);<br> ntReq <br> = <br>pfMalloc(sizeof(NTREQ), arena);<br><br> Client = <br><br>pfMalloc(sizeof( CLIENT ), arena);<br> BBoxTerrain = <br><br>pfMalloc(sizeof ( pfBox ), <br>arena);<br><br> /* initialize global values <br>*/<br> <br>initGlobal();<br><br>
<br><br>/*------------------------------------------------------<br> * <br><br>Initialize main Gfx variables.<br> <br><br>*-----------------------------------------------------*/<br> <br><br>initGfx();<br> readConfigFile();<br><br> // <br><br>pfMultiprocess(PFMP_DEFAULT); <br> pfMultiprocess(PFMP_FORK_DBASE | <br><br>PFMP_FORK_LPOINT);<br> pfMultipipe(2);<br><br> // scb - <br>uncommented <br>Multithread(...)<br> /* pfMultithread(0, PFPROC_CULL, <br>2); */<br><br> <br>pfdInitConverter("flt");<br> pfConfig();<br> <br><br>pfFilePath( "../data/");<br> pfNotifyLevel(PFNFY_FATAL);<br>#ifdef <br><br>GFXAUTOSYNC<br> pfFrameRate(MttGfx->FrameRate);<br> <br><br>pfPhase(PFPHASE_LOCK);<br>#endif<br>}<br><br><br><br><br><br>static <br>void <br>OpenPipeWin(pfPipeWindow *pwin)<br>{<br> <br><br>pfOpenPWin(pwin);<br>}<br><br>static <br>void<br>initPipeWindow(void)<br>{<br> <br> int constraints[] = {<br> <br>PFFB_DOUBLEBUFFER,<br> PFFB_RGBA,<br> <br>
<br><br>PFFB_RED_SIZE, 5, <br> PFFB_GREEN_SIZE, 5, <br> <br>PFFB_BLUE_SIZE, <br> 5, <br><br> PFFB_ALPHA_SIZE, 1, <br> <br>PFFB_STENCIL_SIZE, 8, <br><br> PFFB_DEPTH_SIZE, 15, <br> <br>(int)NULL<br> };<br> <br><br>/*------------------------------------------------------<br> * <br><br>Configure graphics pipeline.<br> <br><br>*-----------------------------------------------------*/<br> <br><br>mttGlobal->gfxPipeLOWER = pfGetPipe(0);<br> if <br><br>(!(mttGlobal->gfxPipeLOWER)) {<br> fprintf(stderr, "ERROR: Unable <br>to <br>initialize (pfPipe *) LOWER!\n");<br> abort();<br> }<br> <br><br>mttGlobal->gfxPipeUPPER = pfGetPipe(1);<br> if <br><br>(!(mttGlobal->gfxPipeUPPER)) {<br> fprintf(stderr, "ERROR: Unable <br>to <br>initialize (pfPipe *) UPPER!\n");<br> abort();<br> }<br> <br><br> <br>pfPipeScreen(mttGlobal->gfxPipeLOWER,0);<br> <br><br>pfPipeScreen(mttGlobal->gfxPipeUPPER,1);<br> <br> mttGlobal->pwinLOWER <br>=
<br>pfNewPWin(mttGlobal->gfxPipeLOWER);<br> if <br>(!(mttGlobal->pwinLOWER)) <br>{<br> fprintf(stderr, "ERROR: Unable to <br>initialize (pfWindow *) <br><br>LOWER!\n");<br> abort();<br> }<br> <br>mttGlobal->pwinUPPER = <br>pfNewPWin(mttGlobal->gfxPipeUPPER);<br> if <br>(!(mttGlobal->pwinUPPER)) <br>{<br> fprintf(stderr, "ERROR: Unable to <br>initialize (pfWindow *) <br><br>UPPER!\n");<br> abort();<br> }<br> <br><br> <br>pfPWinName(mttGlobal->pwinLOWER,MttGfx->ScreenLOWER.Name);<br> <br><br>pfPWinType(mttGlobal->pwinLOWER, PFWIN_TYPE_X);<br> pfPWinMode( <br><br>mttGlobal->pwinLOWER, PFWIN_NOBORDER, 1);<br> pfPWinConfigFunc( <br><br>mttGlobal->pwinLOWER, OpenPipeWin);<br> pfChoosePWinFBConfig( <br><br>mttGlobal->pwinLOWER, constraints);<br> pfConfigPWin( <br><br>mttGlobal->pwinLOWER );<br> pfPWinOriginSize(mttGlobal->pwinLOWER, <br>0, <br>0,<br> MttGfx->ScreenLOWER.SizeW,<br> <br>MttGfx->ScreenLOWER.SizeH);<br> <br>
<br>//pfPWinScreen(mttGlobal->pwinLOWER,0);<br> <br><br>pfOpenPWin(mttGlobal->pwinLOWER);<br> <br> <br><br>pfPWinName(mttGlobal->pwinUPPER,MttGfx->ScreenUPPER.Name);<br> <br><br>pfPWinType(mttGlobal->pwinUPPER, PFWIN_TYPE_X);<br> pfPWinMode( <br><br>mttGlobal->pwinUPPER, PFWIN_NOBORDER, 1);<br> pfPWinConfigFunc( <br><br>mttGlobal->pwinUPPER, OpenPipeWin);<br> pfChoosePWinFBConfig( <br><br>mttGlobal->pwinUPPER, constraints); <br> pfConfigPWin( <br><br>mttGlobal->pwinUPPER );<br> pfPWinOriginSize(mttGlobal->pwinUPPER, <br>0, <br>0,<br> MttGfx->ScreenUPPER.SizeW,<br> <br>MttGfx->ScreenUPPER.SizeH);<br> <br> <br>//pfPWinScreen(mttGlobal->pwinLOWER,1);<br> <br><br>pfOpenPWin(mttGlobal->pwinUPPER);<br> <br> /* set off the draw <br>process <br>to open windows and call init callbacks */<br> <br>pfFrame();<br><br> <br>sleep(3);<br> <br> <br>pfPWinFullScreen( <br>mttGlobal->pwinLOWER );<br> pfPWinFullScreen( <br>mttGlobal->pwinUPPER <br>);<br> <br>
mttGlobal->dspLOWER = <br>pfGetCurWSConnection();<br><br> // <br>Logic To Set Up Catching Of X-Events <br>on the lower touch screen<br> <br>mttGlobal->winLOWER = <br><br>pfGetPWinWSWindow(mttGlobal->pwinLOWER);<br> <br><br>XSelectInput(mttGlobal->dspLOWER,mttGlobal->winLOWER,KeyPressMask | <br><br><br>ButtonPressMask );<br> <br><br>XMapWindow(mttGlobal->dspLOWER,mttGlobal->winLOWER);<br> <br><br>XSync(mttGlobal->dspLOWER,FALSE);<br><br> <br><br>/*------------------------------------------------------<br> * <br>Remove <br>cursor arrow.<br> <br><br>*-----------------------------------------------------*/<br>#ifndef <br><br>TESTMTT<br> pfuLoadPWinCursor(mttGlobal->pwinLOWER, <br><br>PFU_CURSOR_OFF);<br>#endif<br>}<br><br><br><br><br><br>Christopher D. <br><br>Johnson<br>AV-8B Harrier II Simulators<br>ISEO Support Team<br>Cherry <br><br>Point, <br><br>NC<br>252-466-4542<br>252-466-4538<br><br>_______________________________________________<br>Join <br><br>Excite! -
<br>http://www.excite.com
>The most personalized portal on <br>the <br><br>Web!<br><br><br>-----------------------------------------------------------------------<br> <br><br> List Archives, Info, FAQ: <br>http://www.sgi.com/software/performer/
> <br>Open Development Project: <br>http://oss.sgi.com/projects/performer/
> <br>Submissions: <br>info-performer++at++sgi.com<br> Admin. requests: <br><br>info-performer-request++at++sgi.com<br>-----------------------------------------------------------------------<br><br><br><br>-----------------------------------------------------------------------<br> <br><br> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> <br><br>Open Development Project: http://oss.sgi.com/projects/performer/
> <br> <br>Submissions: info-performer++at++sgi.com<br> Admin. requests:
<br><br>info-performer-request++at++sgi.com<br>-----------------------------------------------------------------------<br><br><br><br><br><br>_______________________________________________<br>Join <br>Excite! - http://www.excite.com
>The most personalized portal on the <br>Web!<br><br><br><br><br><br><br>_______________________________________________<br>Join Excite! - http://www.excite.com
>The most personalized portal on the Web!<br><br><br><br><br>
Join Excite! - http://www.excite.com
The most personalized portal on the Web!