On 3/8/07, Ulrich Hertlein <[EMAIL PROTECTED]> wrote:
Farshid Lashkari wrote:
>> 10. Should these be #defined or enumed in some header file so that
>> more complicated bin arrangements can be future-proof and easier to
>> design just by looking at the headers?
>
> This is a good idea. You should probably add these definitions in the
> header file for StateSet.
>...
> The bin name specifies what type of bin to put it in. For example, the
> default "RenderBin" uses state sorting to render drawables with the
> same bin number. The "DepthSortedBin" sorts drawables by their depth.
On the same note wouldn't it make sense to also add #defines for these
two names? Like STATE_SORTED_BIN and DEPTH_SORTED_BIN?
This whole area could do with a revamp, but we can probably do
something modest to help in the this case. #define's won't cut it
though as this is compile time, and what Terry is after is ability to
define the bin number at runtime.
The runtime setting is actually already fully support, just not via
the convenience functions for OPAQUE and TRANSPARENT_BIN hints.
Perhaps a global variable and methods for setting the value of bin
would be sufficient. Perhaps one could just set the bin number
directly via the prototype in osgUtil.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/