Chris Hanson wrote:
I've been trying to migrate my app over to OSG 1.1 as a prelude for
doing some new work.
I checked out and rebuilt OpenThreads, Producer and OSG last week. (I
build everything with static linking.) Now, when I rebuild and recompile
my app, it crashes during startup, before it even hits main().
More data:
I commented out the doofus-error checking in StateSet::setMode():
void StateSet::setMode(StateAttribute::GLMode mode, StateAttribute::GLModeValue
value)
{
//if (!s_textureGLModeSet.isTextureMode(mode))
if(1)
{
setMode(_modeList,mode,value);
}
else
{
notify(NOTICE)<<"Warning: texture mode '"<<mode<<"'passed to setMode(mode,value),
"<<std::endl;
notify(NOTICE)<<" assuming setTextureMode(unit=0,mode,value)
instead."<<std::endl;
notify(NOTICE)<<" please change calling code to use appropriate
call."<<std::endl;
setTextureMode(0,mode,value);
}
}
And everything works great now. But I still don't understand why it was failing before.
It appears that this is all very old code (StateSet.cpp annotate shows it as "1.23 (robert
23-Jul-02)"). But, I notice in the CVS graph for StateSet.cpp:
Revision : 1.59
Date : 2006/6/29 15:57:23
Author : 'robert'
State : 'Exp'
Lines : +1 -1
Description :
Added support for RenderBin's have a local top level StateSet. This is now
used by default in the depth sorted bin.
This sounds like it's possibly related to the problem, and I think it occurred during
the interval in question. The changes in StateSet.cpp weren't all that significant, but
I'm guessing there were other related changes in the same checkin that might have been
what provoked it.
Robert, do you have any insight on this?
I'm linking OSG statically on Windows under VC++8/2005 if that matters. Possibly it has
something to do with initialization of some global relating to the sorted RenderBins?
--
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/