In my current example there are about 12 000 text drawables. I know, it's a lot, but they represent vertex numbers within my polygons and are located next to each vertex. If my time measuring is correct, the combined time for all setText calls on these texts is about 4 seconds on my P4 3.4GHz. Re-using by calling the copy constructor on existing texts seems to take about the same time, so I figured it would be the computeGlyphRepresentation method that was the problem. However, I haven't measured in more detail, so I don't know what takes time within computeGlyphRepresentation.

I haven't used osgText that much before and I was hoping for some ideas of how to clone these texts somehow, as there will be many identical 0s, 1s and 2s among them, but with different positions. Of course, one could use transforms, sharing the same geodes, each with one text drawable. But I guess 12 000 transforms don't come cheap either...

/Andreas


Robert Osfield wrote:

On 8/13/06, Andreas Ekstrand <[EMAIL PROTECTED]> wrote:

I'm afraid my question below passed unnoticed. I still wonder if there's
any way I can speed up the creation of my large number of text
drawables? Is there e.g. really a need for calling
computeGlyphRepresentation from the Text copy constructor?


It didn't go unnoticed, but unanswered.  I for one simply don't have
an answer.

I've very suprised that creating text should be so slow.  How many
text items are we talking about?

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to