Hello Gabriel,
Gabriel Zachmann wrote:
> Is it possible to access OpenSG data structures (via OpenSG method
> calls) from threads that were not created as OpenSG threads?
yes, but OpenSG needs to be told about the thread so it knows which
aspect the thread should modify, see below how to do that.
> Right now, I've got a program with a non-OpenSG thread that makes the
> program crash, whenever it tries to execute an OpenSG function.
> Gdb shows that it crashes here:
>
>> 0xb72f7cd5 in osg::PThreadBase::getAspect () at
>> /home/weiyu/Projects/OpenSG/Source/System/FieldContainer/OSGThread.cpp:142
>>
> All insights will be highly appreciated!
this is probably the same problem Weiyu just asked about ;)
To register an external thread with OpenSG put the following at the top
of the thread fucntion:
OSG::UInt32 aspectId = 0;
OSG::ExternalThread::get(0)->initialize(aspectId);
Cheers,
Carsten
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users