From: Paolo Farinelli (paolo++at++sgi.com)
Date: 11/02/2005 12:51:28
Hi Christopher,
You should make sure you clear your depth buffer
before rendering your 3d scene.
Alternatively, clear depth before rendering your
background channel, but disable depth writes
when rendering the background.
Regards,
Paolo
On Wed, 2 Nov 2005 11:20:34 -0800, Svend Tang-Petersen
<svend++at++tarpon.engr.sgi.com> wrote:
>
> Probably because when you draw the 2D channel you clear the framebuffer
> first instead of just drawing on top of whats already there.
>
> Svend
>
> *****************************************************************
> Svend Tang-Petersen, MSc Email: svend AT sgi.com
> SGI Pager: svend_p AT pager.sgi.com
> 1500 Crittenden Lane Phone: (+1) 650 933 3618
> Mountain View
> California 94043
> USA
> MS 30-2-526
> *****************************************************************
>
>
> On Wed, 2 Nov 2005, Christopher D. Johnson wrote:
>
>>
>> Greetings all. My situation is aas follows:
>>
>> I have a pfPipeWindow that has 3 pfChannels set in it. The first
>> channel I create is a view of a cockpit "panel", and it is the
>> background that the other two channels are laid on top of. There are no
>> 3D graphics or scene data being rendered to this channel. It is 2D GL
>> only. The second channel USED to be another 2D channel (call it "2D
>> symbology") that overlaid the first channel in an area where a
>> simulated display is. It also drew 2D symbology only (ie there was no
>> scene attached to it, and no 3D being draw with GL).
>>
>> I have now added a 3rd channel (call it "video channel"), which DOES
>> have a 3D scene attached to it (simulated video), and which needs to
>> lay "in between" the "panel" channel (the panel that fills the entire
>> window) and the "2D symbology" channel. That way, this new "video"
>> channel overlays the "panel", and the "2D symbology" channel overlays
>> the "video" channel, so:
>>
>> Bottom = "Panel"
>> Middle = "3D Video"
>> Top = "2D Symbology" in the same region as the "3D Video" channel.
>>
>> My problem is this: While I have set up my channels in this order, what
>> happens is that I never see my "3D Video" channel. I only see my panel
>> and the 2d symb. channel. If I swap the order in which the 3D Video and
>> the 2D symbol. channel are created, suddenly my 3D video overlays my
>> symbology, so I can see it, but now my symbology appears to be
>> underneath it. Here is how I am setting up the channels:
>>
>> /*------------------------------------------------------
>> * Configure Performer channel parameters.
>> *-----------------------------------------------------*/
>>
>> // Initialize Channel 1 (Background Panel)
>> mttGlobal->chan1 = pfNewChan(mttGlobal->gfxPipe);
>> pfAddChan(mttGlobal->pwin,mttGlobal->chan1 );
>> pfChanTravFunc(mttGlobal->chan1, PFTRAV_CULL, CullChannel1);
>> pfChanTravFunc(mttGlobal->chan1, PFTRAV_DRAW, DrawChannel1);
>> pfChanNearFar(mttGlobal->chan1, 2.0, 50000.0);
>> pfChanFOV(mttGlobal->chan1, 45.0f, -1.0f);
>> pfChanTravMode(mttGlobal->chan1, PFTRAV_CULL, PFCULL_VIEW |
>> PFCULL_SORT);
>> pfChanViewport(mttGlobal->chan1, 0.0, 1.0, 0.0, 1.0);
>>
>> // Initialize Left LPOD Video Channel (Left MPCD)
>> mttGlobal->lt_channel_left = pfNewChan(mttGlobal->gfxPipe);
>> pfAddChan(mttGlobal->pwin,mttGlobal->lt_channel_left );
>> pfChanTravFunc(mttGlobal->lt_channel_left, PFTRAV_DRAW,
>> Cull_lt_channel_left);
>> pfChanTravFunc(mttGlobal->lt_channel_left, PFTRAV_DRAW,
>> Draw_lt_channel_left);
>> pfChanScene(mttGlobal->lt_channel_left, mttGlobal->scene);
>> pfChanNearFar(mttGlobal->lt_channel_left, 2.0, 50000.0);
>> pfChanFOV(mttGlobal->lt_channel_left, 45.0f, -1.0f);
>> pfChanTravMode(mttGlobal->lt_channel_left, PFTRAV_CULL, PFCULL_VIEW
>> | PFCULL_SORT);
>> pfChanViewport(mttGlobal->lt_channel_left, 0.0933f, 0.420f, 0.0999,
>> .5086);
>>
>> // Initialize Channel 2 (Both MPCDs)
>> mttGlobal->chan2 = pfNewChan(mttGlobal->gfxPipe);
>> pfAddChan( mttGlobal->pwin, mttGlobal->chan2 );
>> pfChanTravFunc(mttGlobal->chan2, PFTRAV_CULL, CullChannel2);
>> pfChanTravFunc(mttGlobal->chan2, PFTRAV_DRAW, DrawChannel2);
>> pfChanNearFar(mttGlobal->chan2, 2.0f, 5.0e6f);
>> pfChanFOV(mttGlobal->chan2, 45.0f, -1.0f);
>> pfChanTravMode(mttGlobal->chan2, PFTRAV_CULL, PFCULL_VIEW |
>> PFCULL_SORT);
>> pfChanViewport(mttGlobal->chan2,0,1,0,1);
>>
>>
>> Any clues here or is the problem somewhere else in my program? Why does
>> my 3D video channel seem to jsut "disappear", which I suspect means it
>> is being totally covered up by the 2D symb. channel.
>>
>>
>> Christopher D. Johnson
>> AV-8B Harrier II Simulators
>> ISEO Support Team
>> Cherry Point, NC
>> 252-466-4542
>> 252-466-4538
>>
>> _______________________________________________
>> Join Excite! - http://www.excite.com
>> The most personalized portal on the Web!
>>
>>
>> -----------------------------------------------------------------------
>> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
>> Open Development Project: http://oss.sgi.com/projects/performer/
>> Submissions: info-performer++at++sgi.com
>> Admin. requests: info-performer-request++at++sgi.com
>> -----------------------------------------------------------------------
>>
>>
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
>
>
-- Paolo Farinelli <paolo++at++sgi.com> OpenGL|Performer - Silicon Graphics Inc.
This archive was generated by hypermail 2b29 : Wed Nov 02 2005 - 12:45:55 PST