Hi, On Monday 27 April 2009 18:16:25 Jonas Walti wrote: > I'm still working on the integration of OSG in EQ. Whatever, an > interesting point is the eventhandling. My idea is, to pass more or less > all the keyboard and mouse inputs to the EqViewer (which is a sublcass > of the std osg::Viewer class). Then the osg application would work more > or less like if the default osgViewer window would receive the events. > In this default osgViewer, there is an EventQueue where one can easily > adapt all the events. > If the EqViewer receives the events, one can use the osg-eventhandlers, > which makes everything a lot easier and forces the abstraction of EQ and > OSG. > > My questions: > In which EQ-Method should I pass this events to the EqViewer, to keep > everything synchronized and correct? > > Or is there maybe a better and complete different approach?
You could use Config::handleEvent() to translate Equalizer events to OSG events and add them to the EventQueue I guess. I'm not sure how you can get the EventQueue of the viewer. The viewer has a window, which is a osgViewer::GraphicsWindow, where you can get the EventQueue from it seems. We use a GraphicsWindowEmbedded as the GraphicsWindow, so that OSG re-uses the context provided by Equalizer instead of creating its own window. Not sure if that already provides an EventQueue, maybe you need to derive from it. Anyway, I think this is a nice idea and would simplify things. Regards, Thomas > PS: Thomas' eqOSG Version works like charm on our 4-pipe cave simulation > set-up! Thanks! Good to hear :)
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ eq-dev mailing list [email protected] http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev http://www.equalizergraphics.com

