Re: pfDrawBin and pfDraw

New Message Reply Date view Thread view Subject view Author view

Rémi Arnaud (remi++at++remi.engr.sgi.com)
Tue, 19 May 1998 13:47:12 -0700 (PDT)


Mario Veraart wrote:
>
> Remi Arnaud wrote:
> > Mario Veraart wrote:
> > >
> > > I would like to implement a multipass algorithm and for this I have to
> > > draw the geometry in a certain order. For this I want to use the bins
> > > of a pfChannel. As an experiment I replaced the call of pfDraw with
> > > the following two lines
> > >
> > > pfDrawBin(PFSORT_OPAQUE_BIN);
> > > pfDrawBin(PFSORT_TRANSP_BIN);
> > >
> > > The result is that nothing gets drawn, only the sky and ground are
> > > drawn. If I set the bin number explicitly then only the geometry in
> > > the transparent bin is visible.
> > >
> > > My questions
> > >
> > > 1: What is pfDraw() doing besides calling pfDrawBin() in the order
> > > specified with setBinOrder()?
> >
> > pfDraw() draws everything that do not fall in a Bin, and then draw
> > the bins.
>
> But how can it be explained that if I set the bin number explicitly
> and call pfDrawBin for every bin I see only the geometry of the
> transparent bin? Is this not equivalent to a call to pfDraw()?

 Either you do not draw all the bins, or the objects do not fall in a
 bin.

 Also it may be an issue with the boggus logic used in 2.0/2.1, which has
 been fixed in 2.2
>
> > Since 2.2 you can use pfDrawBin(-1) to draw the objects that are
> > not in a bin. Note, you have to use CULL separated from DRAW or
> > CULL_DL_DRAW for the object not to be rendered immediately.
> >
> > > 2: The programmers guide tells that it is possible to add more bins
> > > but does not tell you how. Is a call to setBinOrder() with an unkown
> > > bin number enough to create a new bin for this pfChannel?
> >
> > pfGeoSet::setDrawBin(b) will tell Performer to draw the geoset in
> > the bin b. setBinOrder(b,order) will create the bin b and tell pfDraw
> > in wich order to draw the bins.
> > Note that each geoset has to have its own geostate for the bin mechanism
> > to work. See 2.2 pfChannel man pages.
>
> Is this also true for Performer 2.0? In the test program I used a few
> simple flight models. So it could be that they share the geostate.

 Its ok to share a geostate, just need to have one attached to each pfgeoset
 (pfGeoSet::setGState(pfGeoState *gstate))
>
> > > 3: If I have to rely on pfDraw() to draw the geometry how can I set up
> > > the right GL calls to implement the wanted multipass algorithm?
> > Since 2.2 you can use pfDrawScene(). pfDraw() may call an internal
> > multipass (for pfLightSource).
>
> > > Any help to solve this problem is appreciated.
> > > I use Performer 2.0 on a REII. If Performer 2.2 is better on the point
> > > of using bins I will have to upgrade.
> >
> > A lot better, please upgrade.
>
> Mario Veraart
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>

    _ / _ _
|_) _ ._ _ o /\ |_)|\ | /\ | || \
| \(/_| | || /--\| \| \|/--\|_||_/
                                           
=======================================================================
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:57:25 PDT

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