Hello Edmund,

On 10/13/2011 03:51 AM, Edmund Buchal wrote:
> I have a problem with creating geometry and setting transformations form a
> thread in my application.
[SNIP]
> Can somebody help me with this?

The Geometry misses that it has been modified, because there is no call 
to commitChanges() in the while loop of rotate(). Therefore it never 
gets a chance to mark it's display list as out of data for rendering.
Add a commitChanges() call after the for loop in rotate (around line 
203) and it works.

> I also have some questions about threads and aspects:
>
> 1. If i load a model and then call OSG::commitChangesAndClear() in the main
> thread after loading it, can i still make
> changes to the model in a thread using another aspect when i start the
> thread after calling OSG::commitChangesAndClear() in
> the main thread? Or do I have to keep the changelists in the application
> thread and  call applicationThread->getChangeList()->applyAndClear()
> from the second thread so the second thread creates the necessary copies of
> the data in its aspect?

when you clear the changelist you loose the information about objects 
that were created up to this point, so they will not exist in the aspect 
you apply the changes to. You can use ChangeList::fillFromCurrentState() 
to fill a changelist with the entries that lead to the current state of 
the aspect.

> 2. Are only the field containers which are changed by the second thread
> duplicated or is the whole scene duplicated? My scene has about 900MB
> when loaded, so duplicating the whole thing in the second aspect is not
> really an option...

the whole scene is duplicated, but MFields share the actual storage 
until they are modified in one aspect. So while there are two instances 
of every FieldContainer object, most of the memory intensive data 
(textures, geometry) is shared.

        Cheers,
                Carsten

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to