Hi Christian, With rendering applications you almost always want to avoid just created data before rendering as this causes a frame stall when it's most critical. It's best to create the data and set all the values as much as possible on start up.
As for the expense of osgText::Text, I'm afraid this is required for all the various features that it provides. If you have very specific needs and require hundreds of thousands of text labels than a custom scheme, such are create your own equivalent osgText::Text class might be appropriate. With a custom class you can do things in a way that is very specific to your needs. Robert. On 17 November 2011 15:14, Christian Buchner <[email protected]> wrote: > Hi, > > even though sizeof(osgText::Text) is rather small, the object > allocates quite a lot of memory in its constructors, most of it being > caused by osgText::TextBase. > > #include <osgText/> > void main(int argc, char **argc) > { > osgText::Text tmp; // sizeof(tmp) is small, but about 10 times > that memory is allocated in the constructor hierarchy. > }; > > I was wondering if it would make sense to defer part of the dynamic > initialization until the Text object is actually used for the first > time (e.g. rendered) ? > > Christian > _______________________________________________ > 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

