Re: [osg-users] Threading issues with osgText

2010-10-13 Thread Johannes Nilsson
Hi, I had similar problems in OSG 2.8.2 when calling osgText::Text::setText(string) while the text was being rendered by another thread. My solution was to use a DrawCallback and a Mutex lock to avoid calling setText at the same time as the drawImplementation. I'm not sure if this is a good

Re: [osg-users] viewer and loops..

2010-02-17 Thread Johannes Nilsson
Hi Martin, Use the viewer.frame() method to run event, update and rendering traversals: while(!done) { // Your code... viewer.frame(); } Alternatively you can run each method separately: viewer.realize(); while(!done) { // Your code... viewer.advance();

[osg-users] Freeze in ThreadPerCamera

2008-11-06 Thread Johannes Nilsson
Hi, I have had some problems with OSG freezing when running in ThreadPerCamera mode. My problems were resolved with two changes: The first one changes the order of the startRenderingBarrier and the reset of the endDynamicDrawBlock. This makes sure that the reset of the _endDynamicDrawBlock is

[osg-users] CompositeViewer and multiple cull/draw threads.

2008-05-12 Thread Johannes Nilsson
Hi, When using a CompositeViewer and multiple threads, I found that it is necessary to run getBound() on the topnode of the scenes between updateTraversals() and renderingTraversals() to be sure to be thread safe. I read that this is done in SceneView::update(), but is this the correct way of