Hiya,

I have OSG setup with a viewer and an EmbeddedGraphicsWindow, setup like:
myViewer = new osgViewer::Viewer;
myWindow = myViewer->setUpViewerAsEmbeddedInWindow(...);

 It seems to work fine (I can see the contents of my scene fine). Now
I want to add a trackball manipulator. So I call:
myViewer->setCameraManipulator(new osgGA::TrackballManipulator);

Then I try to pass it mouse events... but I get a seg fault on this line:
myWindow->getEventQueue()->mouseButtonPress(mousex,mousey,mousebtn);

I tried to follow the SDL example included with source to set mouse
events up. Here's the stack trace:

(gdb) backtrace
#0  0x00007ffff760d21c in
osg::Object::setUserDataContainer(osg::UserDataContainer*) () from
/usr/lib/libosg.so.80
#1  0x00007ffff760d3bb in osg::Object::Object(osg::Object const&,
osg::CopyOp const&) () from /usr/lib/libosg.so.80
#2  0x00007ffff6cc1cd1 in
osgGA::GUIEventAdapter::GUIEventAdapter(osgGA::GUIEventAdapter const&,
osg::CopyOp const&) () from /usr/lib/libosgGA.so.80
#3  0x00007ffff6cbc825 in osgGA::EventQueue::mouseButtonPress(float,
float, unsigned int, double) () from /usr/lib/libosgGA.so.80
#4  0x000000000040f0ec in osgGA::EventQueue::mouseButtonPress (this=0x994520,
    x=426, y=237, button=1) at /usr/include/osgGA/EventQueue:126
#5  0x000000000040e573 in Viewport::mousePressEvent (this=0x8e6c90, event=
    0x7fffffffd580) at ../../libosmscout-render/mapviewer/viewport.cpp:101

Am I missing something obvious?


Regards,

Preet
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to