Thanks for help,
a bit of code will be more clear so this is something approaching :
osg::Geode* createMoon(std::string texturePath);
osg::Geode* createSun(std::string texturePath);
and in the main:
_root->addChild(createSkyMap(config->Skypath));
_root->addChild(createSunLight(_root.get()));
_root->addChild(earthGroup);
...
_root->addChild(createSun(...)) //ok
_root->addChild(createMoon(...)) //error
but if I do this :
_root->addChild(createSkyMap(config->Skypath));
_root->addChild(createSunLight(_root.get()));
_root->addChild(earthGroup);
...
//_root->addChild(createSun(...))
_root->addChild(createMoon(...)) //ok
So I don't understand what can be the problem...
I if put createSun() or createMoon() it work well, but if I put the two, it
crashes...
I hope it's more clear now.
Thanks,
Vincent
2008/5/2 Gordon Tomlinson <[EMAIL PROTECTED]>:
> Without seeing your code one cannot really say what is wrong with what
> you doing
>
>
>
> Typically in this case I would say it is because one of the Geodes your
> adding has not been created correctly, its geometry is not set up, or
> possibly your using a stale of corrupt pointer
>
>
>
> __________________________________________________________
> *Gordon Tomlinson *
>
> Email : [EMAIL PROTECTED]
> YIM/AIM : *gordon3dBrit*
> MSN IM : [EMAIL PROTECTED]
> Website : *www.vis-sim.com www.gordontomlinson.com*
>
> __________________________________________________________
>
>
>
> *From:* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *On Behalf Of *Vincent
> Bourdier
> *Sent:* Friday, May 02, 2008 5:27 AM
> *To:* osg
> *Subject:* [osg-users] Limit on number of children ?
>
>
>
> Hi all,
>
> Somewhere in my code, I make some root->addChild(functionCreateGeode());
>
> but when I added a last one, OSG crash on rendering, pretending a vector
> error.
> I've verified, it do not depend on the Geode, because it work if I remove
> an "addChild()" before doing mine...
>
> Is there a limit in the number of child ? or is it impossible to add 2
> Geode (or more) on the same group ?
>
> thanks.
>
> Regards,
> Vincent.
>
> _______________________________________________
> 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