pfHyperpipe() not working on IRIS Skywriter

New Message Reply Date view Thread view Subject view Author view

Wm. Frank Dea (wfdea++at++blue.weeg.uiowa.edu)
Wed, 31 May 1995 08:26:25 -0500 (CDT)


        I am trying to use Performer 1.2 on IRIX 5.3 to set up a hyperpipe on a
2 processor 2 geometry engine IRIS Skywriter. I am new user of Performer and
would appreciate any advice you may have to offer.
        The following code sets up 2 pipes each with their own channels and
callback functions. I also set my own pfChanDrawFunc and pfChanCullFunc
callbacks for each channel.
        However, the following code seems to hang after the first
iteration of the while loop. Can you see the flaw in my code? Also, the
sample program "perfly" seems to hang in the same way.

Thanks,

Frank
(wfdea++at++blue.weeg.uiowa.edu)

***********************
/*
-- q.c

--
-- This a test c file using performer and GL to create a hyperpipe.
-- Doesn't seem to work correctly on the IRIS Skywriter.
*/

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <gl/device.h> #include <Performer/pf.h> #include <pfsgi.h> #include <Performer/pr.h> #include <pfflt.h>

static void OpenPipeline1 (pfPipe *p); static void OpenPipeline2 (pfPipe *p); static void usage (void); void DrawFunc (pfChannel *chan, void *data); void CullFunc (pfChannel *chan, void *data);

void main (int argc, char **argv) { float t = 0.0f; pfScene *scene; pfPipe *p1, *p2; pfChannel *chan1, *chan2; pfNode *root; float s,c; pfCoord view; /* Initialize Performer */ pfInit(); pfMultipipe(2); pfHyperpipe(2); pfMultiprocess (PFMP_APP_CULL_DRAW);

/* Configure multiprocessing mode and start processes. */ pfConfig();

Set file path, read in .flt file, and attach file to the scene ...

/* Initialize the graphics pipelines. */ p1 = pfGetPipe (0); pfInitPipe (p1, OpenPipeline1); p2 = pfGetPipe (1); pfInitPipe(p2, OpenPipeline2); /* Create and configure a pfChannel. */ chan1 = pfNewChan(p1); pfChanScene(chan1, scene); pfChanNearFar(chan1, 1.0f, 1000.00f); pfChanFOV(chan1, 45.0f, 0.0f);

chan2 = pfNewChan(p2); pfChanScene(chan2, scene); pfChanNearFar(chan2, 1.0f, 1000.00f); pfChanFOV(chan2, 45.0f, 0.0f);

/* Set the Callback routines for both Channels */ pfChanDrawFunc(chan1, DrawFunc); pfChanCullFunc(chan1, CullFunc); pfChanDrawFunc(chan2, DrawFunc); pfChanCullFunc(chan2, CullFunc);

Zero Clock and set viewing vectors ...

pfChanView (chan1, view.xyz, view.hpr); pfChanScene (chan1, scene);

pfChanView (chan2, view.xyz, view.hpr); pfChanScene (chan2, scene);

/* Simulate for ten seconds. */ while (t < 10.0f){

/* Compute new view position. */ t = pfGetTime();

/* Initiate cull/draw for this frame. */ pfFrame(); } /* Terminate parallel processes and exit. */ pfExit(); exit(0);

} /* End of main */

static void OpenPipeline1 (pfPipe *p) { scrnselect(0); /* selects first screen */ foreground(); prefposition (100, 500, 100, 500); winopen("IRIS Performer -- Screen 1"); pfInitGfx(p); } /* End of OpenPipeline1 */

static void OpenPipeline2 (pfPipe *p) { scrnselect(1); /* selects second screen */ foreground(); prefposition (100, 500, 100, 500); winopen("IRIS Performer -- Screen 2"); pfInitGfx(p); } /* End of OpenPipeline2 */

static void usage (void) { fprintf(stderr, "Usage: oldtest file.flt ...\n"); pfExit(); exit(1); } /* End of usage */

void CullFunc (pfChannel *chan, void *data) { static long first = 1;

pfCull(); } /* End of CullFunc */

void DrawFunc (pfChannel *chan, void *data) { pfClearChan(chan); pfDraw(); /* render the frame */ } /* End of DrawFunc */

--
William Frank Dea
     _________/|__________
    /--------/-/---------/
   /    /   / /   /     /          "If you want to get results ...
  /-   /---/-/---/    -/            try a prayer!"
 /    /   / /   /     /
/--------/-/---------/
william-dea++at++uiowa.edu

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:33 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.