RE: HUD

New Message Reply Date view Thread view Subject view Author view

From: Anthony Bavuso (a.t.bavuso++at++larc.nasa.gov)
Date: 01/19/2000 08:55:51


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);
}

-----Original Message-----
From: dorbie++at++sgi.com [mailto:dorbie++at++sgi.com]
Sent: Tuesday, January 11, 2000 6:27 PM
To: a.t.bavuso++at++larc.nasa.gov
Cc: info-performer
Subject: Re: HUD

Please, call me Angus :-)

Anthony Bavuso wrote:
>
> I am beginning to implement a HUD and I have a few questions. As far as I
> know there are two ways to draw a HUD, first method is openGL calls in the
> draw call back functions; second method is to use an overlay channel as
> Dorbie did the aqua witches brew example.
>
> Can I use Dorbie's aqua overlay channel method, in a
> multi-pipe/mutli-channel configuration where, in hardware, different
> channels and pipes are wired to different displays? Referring to my
previous
> email on perfly channel ordering, could I use an overlay channel with that
> kind of hardware setup?

Yes this should work.

I think your use of the word 'overlay' may confuse readers. My example
does not use overlay planes as I'm sure you understand, it simply
overlaps one channel on another. You'd need a channel for each pipe you
required a HUD on.

>
> Also are there any full feature examples like aqua that use the openGL HUD
> method? Where can I find it?

Perfly draws the performer text on overlay planes in a draw callback you
don't need to use overlay planes to implement the orthographic overlay
rendering. Also see the archives for sample code that I and others have
posted over the years to info-performer. Since you say full featured I
presume drawing a string in the corner doesn't uite cut it.

Cheers,Angus.

--
"Success is the ability to go from one failure to another with
 no loss of enthusiasm."    -    Winston Churchill.

Performer + OpenGL examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jan 19 2000 - 08:54:53 PST

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