Hi,
Thanks for the reply!
I actually managed to solve the problem, although I'm not sure of what caused
it! :)
Here's the code for my handler, may it help someone in the same case :
Code:
bool CRightPanelEventHandler::handle(const osgGA::GUIEventAdapter& ea,
osgGA::GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv)
{
if (nv->getFrameStamp() != NULL && nv->getFrameStamp()->getFrameNumber() !=
_lastFrame)
{
_lastFrame = nv->getFrameStamp()->getFrameNumber();
if (ea.getEventType() == osgGA::GUIEventAdapter::PUSH)
{
// Stuff
}
}
}
Checking and recording the framestamp at each loop avoids processing a same
frame two times. But I have no idea why my handler processed each frame two
times...
Cheers,
Ku
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=29360#29360
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org