From Nguyen Van Truong, fix for passing of events to slaves
This commit is contained in:
parent
8fae9c5779
commit
776c03b9e3
@ -408,6 +408,22 @@ void CameraPacket::readEventQueue(osgViewer::Viewer& viewer)
|
|||||||
{
|
{
|
||||||
_events.clear();
|
_events.clear();
|
||||||
|
|
||||||
|
osgViewer::ViewerBase::Contexts contexts;
|
||||||
|
viewer.getContexts(contexts);
|
||||||
|
|
||||||
|
for(osgViewer::ViewerBase::Contexts::iterator citr =contexts.begin(); citr != contexts.end(); ++citr)
|
||||||
|
{
|
||||||
|
osgGA::EventQueue::Events gw_events;
|
||||||
|
|
||||||
|
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(*citr);
|
||||||
|
if (gw)
|
||||||
|
{
|
||||||
|
gw->checkEvents();
|
||||||
|
gw->getEventQueue()->copyEvents(gw_events);
|
||||||
|
}
|
||||||
|
_events.insert(_events.end(), gw_events.begin(), gw_events.end());
|
||||||
|
}
|
||||||
|
|
||||||
viewer.getEventQueue()->copyEvents(_events);
|
viewer.getEventQueue()->copyEvents(_events);
|
||||||
|
|
||||||
osg::notify(osg::INFO)<<"written events = "<<_events.size()<<std::endl;
|
osg::notify(osg::INFO)<<"written events = "<<_events.size()<<std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user