[osg-users] [vpb] vpb generated .osga model seems disturb shared memory in qt4

Lv Qing donlvqing at msn.com
Thu Apr 21 08:50:05 PDT 2011


Hi,

... 


linux qt4 osg2.8.4

I have use ViewerQT to integrate an osg application to a qt4 application witch has other developer's none-osg application.

Then something strange happen,the ViewerQT  seems disturb qt4 application's shared memory ,which cause some memory crash however
not direct to my osg code but other developer's none-osg code.I removed
my osg code entirely,everything is OK,so I pretty sure it is related to my osg code.


Then I remove every osg code but  just loading an vpb generated .osga terrain model,the shared memory disturbing issure return! Instead I load a commen .osga  model like cow.ive ,it is OK!








Thank you!

Cheers,
Lv

Code:

class CompositeViewerQT : public osgViewer::CompositeViewer, public AdapterWidget

{

public:



CompositeViewerQT(QWidget * parent = 0, const char * name = 0, const QGLWidget * shareWidget = 0, WindowFlags f = 0):

AdapterWidget( parent, name, shareWidget, f )

{

setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);


setCameraManipulator(new osgGA::TrackballManipulator);

osg::ref_ptr<osg::Node> loadedModel= osgDB::readNodeFile("terrain.osga");   //vpb generated .osga model .error

osg::ref_ptr<osg::Node> loadedModel= osgDB::readNodeFile("cow.ive");   //OK

setSceneData(loadedModel.get());


connect(&_timer, SIGNAL(timeout()), this, SLOT(updateGL()));

_timer.start(10);

}



virtual void paintGL()

{

frame();

}



protected:



QTimer _timer;

};




------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=38705#38705








More information about the osg-users mailing list