Hi Robert, I'm referring to your request to test a submission of yours. I'm sorry that it is over half a year ago (original post: http://forum.openscenegraph.org/viewtopic.php?t=10760):
> Along similiar lines I earlier implemented a OSG_INIT_SINGLETON_PROXY macro > and used this in src/osgViewer/Scene.cpp to address exactly the same issue > you have looked in RenderBin.cpp. I've now moved this macro into > include/osg/Object and added it's usage into RenderBin.cpp which should > achieve the same end as you modification, but with a few less lines of code > and a with lanaguage that will hopefully help readers understand it's role. > The macro is defined: > > /** Helper macro that creates a static proxy object to call singleton > function on it's construction, ensuring that the singleton gets > initialized at startup.*/ > #define OSG_INIT_SINGLETON_PROXY(ProxyName, Func) static struct ProxyName{ > ProxyName() { Func; } } s_##ProxyName; > > And it's usage is: > > > // Use a proxy to force the initialization of the the > RenderBinPrototypeListSingleton during static initialization > OSG_INIT_SINGLETON_PROXY(RenderBinSingletonProxy, renderBinPrototypeList()) > > > Could you update to svn/trunk and let me know if this works fine for you. Finally, I tested your changes on a Win 7 x64 machine and the problem did not show up again. Furthermore, I think the macro OSG_INIT_SINGLETON_PROXY is clear and helpful, too. Thank you, Matthias Schütze, Germany _______________________________________________ osg-submissions mailing list osg-submissions@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org