[osg-users] RenderingHint vs binNumber(RenderBinDetails)

Tim Moore timoore at redhat.com
Thu Oct 4 07:08:56 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Christophe Medard wrote:
> Sorry for the mailer redisposing of things.
> Here are the examples I wanted to submit :
> 
> 
>              |
>       --------------------------------
>       |                                              |
> osg::Group "A"                        osg::Group "B"
> [binNumber = 8]                 dft, so binNumber = 0
>       |
>   ---------------------------------------------
>   |                                 |                                |
>  osg::Geode "C"        osg::Geode "D"        osg::Geode "E"
>  [binNumber = 5]      [binNumber = 1]          |
>                                                                      |
>                                                      ----------------
>                                                  
> |                         |
>                                   osg::Drawable E0     osg::Drawable E1
>                        dft, so binNumber = 0        [binNumber=6]
> 
> Is it   B/E0 - D - C - A - E1 ?
No. Assuming that E is a child of A, and by the rendering order of a group you
mean other drawables that are under that group, the order is
B-A-E0-D-C-E1. If E is not a child of A -- I can't tell from the diagram -- then the
order is B/E0-E1-A-D-C.

It turns out (I didn't know this) that the sign of a render bin
number is significant; negative child bins are drawn before a bin's render leaves,
postive bins are drawn after.
> 
> 
> Another example, closer to my current purpose test, practical to make multi
> pass drawings :
> 
>               |
>       osg::Group
>               |
>               -------------------------------------
>               |                      |                               |
>               |                      |                               |
>               |           osg::Group "B"           osg::Group "C"
>               |           [binNumber = 20]      [binNumber = 30]
>               |
>     osg::Geode "A"
>     [binNumber = 15]
> 
> 
> Is it A - B - C ?
Yes.

Tim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHBPP4eDhWHdXrDRURArhVAJoC5ENolBRvuwevA4O6oBtSrRWZFACgpl/1
9K7HUvn2NWv1ahs1NlEhXpc=
=nulc
-----END PGP SIGNATURE-----



More information about the osg-users mailing list