Initialization problem

New Message Reply Date view Thread view Subject view Author view

Axel Schmidt (axel++at++artcom.de)
Tue, 23 Jul 1996 19:31:03 +0200


Hi,

there is a problem during the initialization of Performer 2.0
on IRIX 5.3 and 6.2 machines. With exact the following
configuration ...

- the multiprocess mode is (PFMP_APPCULLDRAW | PFMP_FORK_DBASE)
- using a DBase function
- setting the screen for pipe 0 explicit to 0
- open the pipewindow using setConfigFunc() and config()

... you must call pfFrame() before creating a pfChannel,
otherwise it crashes.

Changing one of the above ...

- using PFMP_APP_CULL_DRAW instead of PFMP_APPCULLDRAW
- or don't fork a DBase process
- or don't set the the screen explicit to 0
- or open the pipewindow using open() instead of setConfigFunc() and
  config()

... and it works. Magic?

Here the minimal code to reproduce the problem:

//
// CC magic.c++ -lpf_igl -limage -lgl -lm -lfpe -lfm -lmalloc -o magic
//

#include <Performer/pf/pfPipe.h>
#include <Performer/pf/pfPipeWindow.h>
#include <Performer/pf/pfChannel.h>
#include <Performer/pf/pfScene.h>

void
dbFunc(void *data)
{
    data;

    static pfBuffer* buf = 0;

    if (!buf) {
        buf = new pfBuffer();
        buf->select();
    }

    buf->merge();

    pfDBase();

}

void
openWin(pfPipeWindow* win)
{
    win->open();

}

void
main(void)
{
    pfInit();

    pfMultiprocess(PFMP_APPCULLDRAW | PFMP_FORK_DBASE);
    pfConfig();

    pfDBaseFunc(dbFunc);

    pfPipe* pipe = pfGetPipe(0);
    pipe->setScreen(0);
    pfPipeWindow* win = new pfPipeWindow(pipe);
    win->setOriginSize(0, 0, 100, 100);
    win->setConfigFunc(openWin);
    win->config();

    // Uncomment the following line and it works.
// pfFrame();

    pfChannel* chan = new pfChannel(pipe);
    chan->setScene(new pfScene());

    for (float t = 0.0f; t < 23.0f; t = pfGetTime()) {
        pfFrame();
    }

    pfExit();

}

--
Axel Schmidt      axel++at++artcom.de           fon +49-30-254 17 3
ART+COM Berlin    http://www.artcom.de/    fax +49-30-254 17 555
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

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:53:13 PDT

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