Re: [osg-users] OSG Render Thread in Qt: Access to scene data from main app thread

2013-04-22 Thread Jim Green
u may try to set viewer's threading model as CullThreadPerCameraDrawThreadPerContext, i think it will help u. [quote=Pertur]Hi Robert, So if I have a class where I describe the scene content and where I do changes in real time int update function like this: [code] DemoOSGScene.h /*! Cidetec

Re: [osg-users] OSG Render Thread in Qt: Access to scene data from main app thread

2013-04-15 Thread Martin Scheffler
Hi Pertur, I don't think it is a good idea to manipulate OSG data across threads. Maybe you should instead send commands from your GUI thread to the render thread with Qt signal/slot connections and do the manipulating in the render thread. Signal/slot connections across threads are always

Re: [osg-users] OSG Render Thread in Qt: Access to scene data from main app thread

2013-03-13 Thread Aitor Ardanza
Hi all, I still have problems with this. I modify the code of cookbook like this: Code: class RenderThread : public QThread { public: RenderThread() : QThread(), viewerPtr(0), _done(false) { } virtual ~RenderThread() { if (viewerPtr)

Re: [osg-users] OSG Render Thread in Qt: Access to scene data from main app thread

2013-03-01 Thread Aitor Ardanza
Hi Robert, So if I have a class where I describe the scene content and where I do changes in real time int update function like this: Code: DemoOSGScene.h /*! Cidetec data osg scene class */ class DemoOSGScene: public OSGScene { public: //! An DemoOSGScene constructor. /*!

[osg-users] OSG Render Thread in Qt: Access to scene data from main app thread

2013-02-28 Thread Aitor Ardanza
Hi, Taking this code: https://github.com/xarray/osgRecipes/blob/master/cookbook/chapter9/ch09_02/osg_qthread.cpp I do not know how can I modify, add and remove objects in the scene data from the main app thread. Any suggestion? Thank you! Cheers, Aitor -- Read this topic

Re: [osg-users] OSG Render Thread in Qt: Access to scene data from main app thread

2013-02-28 Thread jamie robertson
Is the following an option? Code: viewer-stopThreading(); *add / remove objects here viewer-startThreading(); jamie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52908#52908 ___ osg-users

Re: [osg-users] OSG Render Thread in Qt: Access to scene data from main app thread

2013-02-28 Thread Robert Osfield
On 28 February 2013 17:19, jamie robertson jamieroberts...@hotmail.com wrote: Is the following an option? Code: viewer-stopThreading(); *add / remove objects here viewer-startThreading(); Start and stopping viewer threads is very expensive and should only be done very occasionally such as