Re: Perf drawing order

New Message Reply Date view Thread view Subject view Author view

Dewey Anderson (dewey++at++evt.com)
Fri, 26 Jul 1996 11:02:16 -0700


Thanks to Mike and Kowsik for pointing out that the cull traversal does sort
the objects into a different order for drawing. Turning off sorting with

   chan->setTravMode( PFTRAV_CULL, PFCULL_GSET | PFCULL_VIEW );

has solved my problem.

The whole "bin" concept looks really useful. Lots of programmer control there.

Interestingly, the problem I had came about because objects were being sorted
back to front by default, which I originally thought is what I WANTED. (My
objects have transparency.) But the distance is calculated on a per-object
basis using the center of the bounding box and my objects were large rectangles
sliding parallel to the screen. This meant that as the near rectangle got high
on the screen, and the far rectangle got centered, the center of the far
rectangle was actually closer than the near one. The sorting swapped the
drawing order and it appeared that the far rectangle popped in front.

I mention this just as a thing to watch for since transparent objects will, by
default, be sorted this way (and for good reason). Because of the way the
distance calculation appears to be done, it won't always give the desired
results.

Dewey Anderson
dewey++at++evt.com
Evolving Video Technologies
=======================================================================
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:53:14 PDT

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