Hello,
I recently noticed when my application starts, something triggers the
REGISTER_OBJECT_WRAPPER macro for my custom uniform class and constructs a new
object before main() is even called.
I'm not much of a C++ guru, so at the moment, the only relevant info I know to
provide is the call stack which looks like:
Code:
SG_UNIFORM_INITIALIZER::`dynamic initializer for
'wrapper_proxy_sg_Uniform_Wrapper''() Line 8
msvcr100d.dll!_initterm(void(void)* * pfbegin, void (void)* * pfend) Line 873
__tmainCRTStartup() Line473 + 0xf bytes
mainCRTStartup() Line 371
The macro code:
Code:
namespace sg {
namespace SG_UNIFORM_SERIALIZER {
REGISTER_OBJECT_WRAPPER( sg_Uniform_Wrapper,
new
sg::Uniform,
sg::Uniform,
"osg::Object osg::Uniform sg::Uniform" )
{
ADD_UINT_SERIALIZER( USize, 0 );
ADD_UINT_SERIALIZER( UType, 0 );
ADD_STRING_SERIALIZER( LexType, "" );
}
};
};
I'd pass on the class header, but it doesn't look like it's relevant...
In any case, it's not a critical issue - things run fine as it is. But it's
creating one instance of my class via the serializer macro before it even
executes main().
I'm using OSG 3.0.1, compiling under VS2010.
Any thoughts?
Joel
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44824#44824
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org