Robert Osfield wrote:
Hi Chris,
The code where things are crashing is very old as you have observed.
The fact is is crashing suggests that the static TextureGLModeSet
s_textureGLModeSet isn't getting constructed for some reason.
Try putting a stop point in the TextureGLModeSet constructor (its at
the top of StateSet.cpp) to see if ts being contructed before the
StateSet setup.
Line 46 of Stateset.cpp:
_textureModeSet.insert(GL_TEXTURE_1D);
does NOT appear to be hit, prior to the exception and crash in my application.
Would could just remove this code, as it was originally written to
catch usage of the OSG during the period that I added support for
multitexturing, helping users spot usage that was no longer valid.
However, this might just get you over this hurdle and on to the next
one.. static initialization may well be a wider problem.
Exactly my thinking.
In this
instance perhaps using a static method getTextureGLModeSet() would a
may of ensuring that it get constructed on first use in a similiar way
to way the singletons work.
I confess, I am a little perplexed by the problem. Could someone with maybe a wider
knowledge of the static initialization situation explain to me what exactly is going on,
and how an object can come into being without being properly constructed?
I strongly suspect this is just the tip of an ugly iceberg. :(
I doubt this problem is related to the addition of an optional
RenderBin::StateSet.
I expect you're right, and the problem just didn't appear before this somehow.
Robert.
--
Chris 'Xenon' Hanson aka Eric Hammil | http://www.3DNature.com/ eric at logrus
"I set the wheels in motion, turn up all the machines, activate the programs,
and run behind the scenes. I set the clouds in motion, turn up light and
sound,
activate the window, and watch the world go 'round." -Prime Mover, Rush.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/