Thank you for your replies. I think the minimal code to recreate this
problem is:

osg::Camera * createCameraFunction(...) {
    osg::ref_ptr<osg::Camera> camera = new osg::Camera;
    // do some stuff
    camera->setAllowEventFocus(false);
    return camera.release();
}

void anotherFunction() {
    osg::ref_ptr<osg::Camera> camera = createCameraFunction(...);
    camera->setAllowEventFocus(true);

    a_view->setCamera(camera);
    // Add some event handlers...
    a_view->addEventHandler(...);
}

When I change the setAllowEventFocus(false) in createCameraFunction to
setAllowEventFocus(true) and remove that line in anotherFunction the issue
was resolved.
So somewhere the setAllowEventFocus was not applied correctly during
release mode, but since debug mode is less sensitive it worked out in that
mode.




On Thu, Sep 4, 2014 at 11:55 AM, Robert Osfield <[email protected]>
wrote:

> HI Patrik,
>
> I would suspect a build problem somewhere along route, be it in how you
> have built the OSG or your own application.
>
> Robert.
>
>
> On 4 September 2014 09:43, Patrik Andersson <[email protected]
> > wrote:
>
>> Hi,
>>
>> In the project I'm working in, we have discovered an inconsistent
>> behavior of the event system. In debug mode, the event handlers works as
>> expected but when we change to release mode they does not work.
>> The strange is that it has worked before. The input is the same as I can
>> see.
>>
>> What could cause such a behavior?
>>
>> Kind regards
>>
>> Patrik
>>
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to