From: Anthony Bavuso (a.t.bavuso++at++larc.nasa.gov)
Date: 01/19/2000 12:03:23
Angus,
I figured out what my problem was. Instead of calling:
pfPipeWindow* pw = p->getPWin(0);
I called:
pfPipeWindow* pw = ViewState->masterChan->getPWin()
and it worked as expected.
But now that I have it working I have another question.
As stated before there seem to be two methods to generate a HUD that I am
interested in: the first is overlapping channels and the second is openGL in
the draw callbacks.
What are the performance implications of using overlapping channels compared
to openGL? Do I loose a lot of performance because I am using a whole
channel for just 2D drawing? Or is the performance impact negligible?
I am going to use this HUD for a real-time pilot in the loop flight
simulation. Which method would you recommend?
Thanks.
-----Original Message-----
From: Anthony Bavuso [mailto:a.t.bavuso++at++larc.nasa.gov]
Sent: Wednesday, January 19, 2000 11:56 AM
To: dorbie++at++sgi.com
Cc: info-performer
Subject: RE: HUD
Angus,
I have begun implementing the overlapping HUD scheme that you used in Aqua
within the perfly source. I have a function InitHUD() (source code attached
below) that creates the HUD channel just as you did in aqua. I call the
InitHUD() function in the perfly source main.C right after the call to
InitGUI().
When I run my modified version of perfly the HUD channel overlaps the GUI
channel and not the view-window in the perfly application. Why does the HUD
channel overlap the GUI channel and not the main viewing channel? I have
tried calling the InitHUD() function before the InitGUI() function and I
observe the same affect.
Thanks a bunch.
void InitHUD()
{
cout << "InitHUD()" << endl;
pfNode* root = NULL;
int masterPipe = 0;
// Init HUD and internal data for pipe of master channel
pfPipe* p = pfGetPipe(masterPipe);
pfPipeWindow* pw = p->getPWin(0);
pfScene *HUDscene = new pfScene();
if ((root = pfdLoadFile("/DB/HUD.flt")) != NULL)
HUDscene->addChild(root);
else
cout << "ERROR: HUD.flt NOT LOADED!!!!!!!!!!!!!!!" << endl;
if ((root = pfdLoadFile("/DB/SIGHT.flt")) != NULL)
{
//SIGHTdcs = new pfDCS();
//SIGHTdcs->addChild(load);
//HUDscene->addChild(SIGHTdcs);
HUDscene->addChild(root);
}
else
cout << "ERROR: SIGHT.flt NOT LOADED!!!!!!!!!!!!!!!" << endl;
pfChannel *HUDchan = new pfChannel(p);
//HUDchan->setViewport(0.25f, 0.75f, 0.25f, 0.75f);
HUDchan->setNearFar(0.5f, 50.0f);
//HUDchan->setFOV(28.5f, 24.0f);
//make transparent
//HUDchan->setTravFunc(PFTRAV_DRAW, DrawHUDChannel);
HUDchan->setScene(HUDscene);
HUDchan->setTravMode(PFTRAV_CULL, PFCULL_VIEW|PFCULL_GSET);
pw->insertChan(1, HUDchan);
}
This archive was generated by hypermail 2b29 : Wed Jan 19 2000 - 12:02:25 PST