Hi,

We had the same problem here, with an event callback on a camera, the push
event was called two times, and we solved it with the same method as you, we
didn't found time to investigate further.

Cheers,

On Thu, Jun 24, 2010 at 2:45 PM, Ku Krapox <[email protected]> wrote:

> 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
>



-- 
Serge Lages
http://www.tharsis-software.com
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to