Philip Lowman wrote:
> Can you post a small example of the problem?
The problem seems to be a threading problem. I'm new to osg so probably the
solution is pretty easy?!
Here's my sample programm which opens 1 qt and 1 osg window, but only one is
active at the same time (in this case the osg window until I close it, then the
qt window is active incl. my protocol in the background):
Code:
#include "Settings.h"
#include <QtGui/QApplication>
//#include "Scene.h"
#include <osg/ShapeDrawable>
#include <osg/Node>
#include <osg/Group>
#include <osgViewer/Viewer>
#include <osgGA/TrackballManipulator>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Settings settings;
settings.show();
//Scene* scene = new Scene();
//scene->init();
//test scene
osgViewer::Viewer viewer;
osg::ref_ptr<osg::Group> root (new osg::Group);
osg::ref_ptr<osg::Geode> boxGeode (new osg::Geode);
osg::ref_ptr<osg::Box> box (new osg::Box(osg::Vec3f(2,0,0), 0.4, 0.4, 0.4));
osg::ref_ptr<osg::ShapeDrawable> boxDrawable (new
osg::ShapeDrawable(box.get()));
boxGeode->addDrawable(boxDrawable.get());
root->addChild(boxGeode.get());
viewer.setSceneData( root.get());
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
viewer.setUpViewInWindow(150,150,800,600);
viewer.run();
return app.exec();
}
Philip Lowman wrote:
> Have you considered using something like a QTimer to send your keep-alive
> messages instead?
I did, but I really want to avoid to spend time on understanding the dmx artnet
protocoll and it's polling policy, especially as it works completely
automatically in other applications.
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=17385#17385
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org