[info-performer] Combined composited and single-pipe output

Date view Thread view Subject view Author view

From: Georgios Papaioannou (gepap++at++fhw.gr)
Date: 01/16/2006 06:45:14


We have the following Prism configuration:

Output 0 -> Single pipe
Output 1 -> Single pipe
Output 2 -|
Output 3 -|-> Composited pipe (1 compositor, id 0, netid 0)
Output 4 -|
Output 5 -|

When I setup Performer for multipipe operation without the compositor (
pfMultipipe(6) ), I can get every pipe from 0 through 5 and open a window
and a channel normally.

If I instantiate a pfCompositor object ( pfCompositor *cmp = new
pfCompositor() ), I cannot obtain any pipe other than 0, which seems to
correspond to the compositor, even though I have requested the pipe with
pfGetPipe(X) and not cmp->getMasterPipe().

pfMultipipe(6) reports pfPipe 4,5 has no screen (seems like it only
recognizes compositor pipes after the pfCompositor instantiation).

For any id of a requested pipe greater than 0, I get a garbled output on the
corresponding composited pipe and the application malfunctions

The behavior is identical if I try to open 2 pipes, one composited (through
pfCompositor->getMasterPipe() ) and one through pfGetPipe(X).

Is it possible that composited outputs cannot coexist with normal outputs?

Georgios Papaioannou,
VR engineer,
Foundation of the Hellenic World, Greece

--------------------
Here is the small initialization code fragment I have used for testing:

#include <stdlib.h>
#include <Performer/pf.h>
#include <Performer/pfutil.h>
#include <Performer/pfdu.h>

int
main (int argc, char *argv[])
{
    float t = 0.0f;
    pfScene *scene;
    pfNode *root;
    pfPipe *p;
    pfPipe *p2;
    pfPipeWindow *pw;
    pfPipeWindow *pw2;
    pfChannel *chan;
    pfChannel *chan2;
    pfSphere bsphere;
    int numofcomp=-1,compid=-1;
    pfCompositor* compositor;
    int cur_mode = -1;
    int n,i;

    if (argc < 2) exit -1;

    pfInit();
    numofcomp = pfGetNumHWCompositors();
    compid = pfGetHWCompositorNetworkId(0);

    pfMultiprocess( PFMP_DEFAULT );
    pfdInitConverter(argv[1]);
    pfMultipipe(6);

    compositor = pfNewCompositor(compid);

    pfConfig();

    pfFilePath(".:/usr/share/Performer/data");
    root = pfdLoadFile(argv[1]);
    scene = pfNewScene();
    pfAddChild(scene, root);
    pfAddChild(scene, pfNewLSource());
    pfGetNodeBSphere (root, &bsphere);

    p = pfGetPipe(0);
    // p = pfGetCompositorMasterPipe(compositor);
    pw = pfNewPWin(p);
    pfPWinType(pw, PFPWIN_TYPE_X);
    pfPWinName(pw, "Composited?");
    pfPWinOriginSize(pw, 100,100,512,512);
    pfOpenPWin(pw);
    chan = pfNewChan(p);
    pfChanScene(chan, scene);
    pfChanFOV(chan, 45.0f, 0.0f);
    pfChanStatsMode(chan, PFCSTATS_DRAW, PFSTATS_ALL);
    pfChanNearFar(chan, 1.0f, 10.0f * bsphere.radius);

/*
    p2 = pfGetPipe(0);
    pw2 = pfNewPWin(p2);
    pfPWinType(pw2, PFPWIN_TYPE_X);
    pfPWinName(pw2, "Plain");
    pfPWinOriginSize(pw2, 100,100,512,512);
    pfOpenPWin(pw2);
    chan2 = pfNewChan(p2);
    pfChanScene(chan2, scene);
    pfChanFOV(chan2, 45.0f, 0.0f);
    pfChanStatsMode(chan2, PFCSTATS_DRAW, PFSTATS_ALL);
    pfChanNearFar(chan2, 1.0f, 10.0f * bsphere.radius);
*/

   while (t < 10)
   {
      pfCoord view;
      float s, c;
      pfSync();
      pfFrame();
      t = pfGetTime();
      pfSinCos(45.0f*t, &s, &c);
      pfSetVec3(view.hpr, 45.0f*t, -10.0f, 0);
      pfSetVec3(view.xyz, 2.0f * bsphere.radius * s, -2.0f * bsphere.radius
*c, 0.5f * bsphere.radius);
      pfChanView(chan, view.xyz, view.hpr);
      // pfChanView(chan2, view.xyz, view.hpr);
    }

    pfExit();
    return 0;
}


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jan 16 2006 - 06:45:01 PST