[osg-users] Cloning text

Andreas Ekstrand andreas.ekstrand at remograph.com
Fri Aug 18 01:14:57 PDT 2017


With OSG 3.2.1 I have been able to do fast shallow cloning of 
osgText::Text in my own subclass, copying the _textureGlyphQuadMap 
instead of calling computeGlyphRepresentation, since the latter is a 
slow operation for my thousands of texts.

In OSG 3.5.6 this isn't possible, I guess due to a private 
GlyphQuads::operator=. So I'm looping through _textureGlyphQuadMap in my 
copy constructor and copy its glyphs and primitives separately instead. 
But I can't see my copied text at all! If I save it out to an .osg or 
.osgt file it's visible in osgviewer.

I guess setting GlyphQuads::operator= private was deliberate, so can 
someone explain how I can accomplish fast text cloning in OSG 3.5.6 or 
optimize it somehow?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170818/9a68f176/attachment.htm>

More information about the osg-users mailing list