Robert Osfield wrote:
I also wanted to point out that your change precludes an app setting the
environment variable with a putenv call, as (on Win32 at least), the
DisplaySettings::readEnvironmentalVariables gets executed at DLL load time,
before application main() gets to execute. putenv was supported in my
original submission, so I wanted to make sure this was a conscious and
intentional change on your part.
Curious, I wasn't aware of this bahaviour under Windows, and am still
a bit surprised by this. osg::DisplaySettings::instance() has to be
called before the singleton is created as the static variable is the
local scope of the instance() method. Is there a global somewhere be
constructed that is calling DisplaySettings::instance()?
My apology for not digging into this a couple days ago when I
encountered it (too much other stuff going on). But yes, this is an
eyebrow-raiser. So I checked under the debugger this morning and
captured the call stack below. It appears the culprit is the static
s_extensions at like 59 in BlendColor.cpp...
> osg61-osgd.dll!osg::DisplaySettings::readEnvironmentalVariables()
Line 214 C++
osg61-osgd.dll!osg::DisplaySettings::DisplaySettings() Line 44 C++
osg61-osgd.dll!osg::DisplaySettings::instance() Line 28 + 0x42 bytes
C++
osg61-osgd.dll!osg::buffered_value<osg::ref_ptr<osg::BlendColor::Extensions>
>::buffered_value<osg::ref_ptr<osg::BlendColor::Extensions> >() Line
32 + 0x50 bytes C++
osg61-osgd.dll!`dynamic initializer for 's_extensions''() Line 59
+ 0xd bytes C++
msvcr90d.dll!6601c02c()
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org