Re: display lists in cull traversal

New Message Reply Date view Thread view Subject view Author view

Christopher Geyer (cgeyer++at++seas.upenn.edu)
Mon, 7 Jul 1997 14:28:57 -0400 (EDT)


> > ->
> > ->What happens is that for some reason a popmatrix() (or apparently the
> > ->token DL_POPMAT) does not get appended to the shadVolDL. It instead gets
> > ->appended to currentDL. So I have an extra pushmatrix() without its
> > ->corresponding popmatrix() in a my shadow volume display list; and I have
> > ->an extra popmatrix() without a cooresponding pushmatrix() in the scene
> > ->display list (this is what I gather from looking at output from gldebug).
> > ->
> > ->It would seem that AFTER the call to preShadVolCullCallback() a
> > ->pushmatrix() is being added, and that AFTER postShadVolCullCallback() a
> > ->popmatrix() is being added. Wouldn't it either be before and after, or
> > ->after and before, but not after and after?
> > ->
> > ->Why would that happen? Obviously I'm not doing things in the right order.
> > ->What would the correct order be?
> >
>
> May I suggest that you use the Bin mechanism. Setting a bin number on a
> node makes it going in a display list with the right amount of Push/Pop
> and state changes.
> pfDrawBin(#) will draw that display list in the draw process.
>
> Regards.
>
> _ / _ _
> |_) _ ._ _ o /\ |_)|\ | /\ | || \
> | \(/_| | || /--\| \| \|/--\|_||_/

For whatever reason, I am unable to get them to work. I have installed
the patches. If I set each pfGeoSet of my shadow volume pfGeode to a
separate bin, say starting at 2, the only way I can get anything drawn is
if I call pfDraw(). Any call to pfDrawBin() does not render anything.

Inspection of chan->binDLists in my channel draw callback shows:

    binDLists = class _pfVoidList {
        end = 0
        asize = 1
        array = 0x18076eb0
    }

indicating, I assume, that there are no display lists for any of the bins.
chan->sceneDList on the other hand is non-null. I know that the geosets
are part of the scene since they're displayed if pfDraw() is called. Also
chan->travModes is set to:

   {
       [0] 0
       [1] 0
       [2] 11
       [3] 1
       [4] 0
   }

So, PFTRAV_CULL has PFCULL_SORT set. I have also verified using
getDrawBin() that the geosets are indeed set to what I want them to be.
All of the above happens whether or not I call setBinSort() and
setBinOrder() when initializing my channel.

Sharon, regarding using a post draw callback on my shadow volume geode,
that does not seem to work. Why would it if the draw "traveral" is
separated from the cull traversal? It is in the cull traversal where the
stack gets messed up.

Christopher Geyer

----------------------------------------------------------------------------
 Christopher Geyer | CompSci and Math '99 at the University of Pennsylvania
  215-732-4218 | cgeyer++at++seas.upenn.edu | http://www.seas.upenn.edu/~cgeyer/

=======================================================================
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:55:35 PDT

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