On 28. Apr 2011, at 23:29, Sythel[via Software] wrote:

> I am trying to send std::vector of an osg object. However system hangs up 
> when i do that. Is there a spesific method to serialize and/or deserialize 
> vector type ? I have examined the examples but all i saw was data structures 
> and arrays not vectors. 

The co::DataOStream/IStream has a serializer for std::vectors which serializes 
each element of the vector. You will however have to write serializers for the 
objects contained in the vector if they are not PODs or if they contain 
pointers, i.e.:

    co::DataOStream& operator << ( co::DataOStream& os, OSG::Node* node ) { 
...; return os; }

> Another question is that if we can commit or sync framedata in a different 
> osg thread? For example in particleupdater, can we call framedata.sync or 
> commit? I tried to do such a thing but system hang up again.

You can commit()/sync() objects from any thread. sync is not threadsafe and 
needs an external lock (see API doc). sync does block if the version has not 
been commited yet.


HTH,

Stefan.

--
View this message in context: 
http://software.1713.n2.nabble.com/Data-types-in-FrameData-h-tp6314925p6316128.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Reply via email to