Hi, Sean.
If you specify renderbin without sorting, then all geometry rendered in
traversal order. You can use graph structure like:
group for each unique font character used with matrix transforms inside
(containing same geometry) to position individual instances of characters
properly, so in this case rendering in traversal order might be ok.
so it'll be like
..
-> mt (some "a" char) -> geometry for
char "a"
-> mt (some other "a" char) -> same
geometry for char "a"
-> group("a" chars)
group(all text)
-> group("b" chars)
..
Cheers
20.01.2012, 02:10, "Sean Sullivan" <[email protected]>:
> Hey guys,
>
> I'm trying to render some text using a special method which requires 2 - 3
> draw calls per character.
>
> I'm adding all of the text to a Group node one character at a time in the
> order that they appear in the text. What I want to do is sort the drawing of
> the characters so that characters that are repeated are drawn consecutively
> to minimize state changes. I tried doing this with a custom RenderBin but I
> couldn't come up with a sorting algorithm that was good enough to sort a
> couple of thousand draw calls every frame.
>
> Ideally I'd like to do this sorting only whenever the text changes. I've been
> trying to sort the _children in my Group node using its traverse function and
> using a CullCallback but that doesn't seem to have any effect, the RenderBin
> still gets all the Geodes in traversal order even though I use a custom
> RenderBin with no sorting.
>
> Is there a way I can do this sorting before the everything gets to the
> RenderBins?
>
> Thank you!
>
> Cheers,
> Sean
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=44922#44922
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org