Hi Benny,

On 7/4/07, Benny Deluxe <[EMAIL PROTECTED]> wrote:
Hi everybody
it s the first time for me here so if i m not precise enough please tell me
so.

Could you post the separate queries in separate email posts, this
makes it much easier to track threads and easier to do searches in the
mailing lists archies.

Problem number 1:

It s about the modKeyMask. It s seem broken.
basic modKeyMask = 4096
pressing leftshift = 4097
pressing left ctrl  = 4160
pressing left ctrl and left shift = 4097 .... it  should be 4161

What platform are you on?

Problem number 2:
When i return true after handling a keyboard event, the 'event manager' give
this event to all the other event handler.shouldn't it stop after the first
eventhandler that handled this event?
I have read that now WE should check if the event has been handled or not,
and i think it s a waste of processor time to check all the eventhandlers
for all the events. OSG should let us the choice to let the events go
through all the eventhandlers or not.
(in osg 1.2 the 'for' ,that check the eventhandlers for a specific event,
exit after that the event was handled. Not anymore....)

Each frame there will only be a small number of events.

Each application there will only be a small number of event handlers.

I don't expect the cost of passing on events to be particularly high,
but I do expect the extra flexibility to be really useful.

Problem number 3: (and it s the less clear)
I use a wxWidget interface and build an osg viewer like this:

    this->osgView = new osgViewer::Viewer();
    osg::ref_ptr<osg::GraphicsContext::Traits> traits = new
osg::GraphicsContext::Traits;
    traits->x = 200;
    traits->y = 200;
    traits->width = 800;
    traits->height = 600;
    traits->windowDecoration = true;
    traits->doubleBuffer = true;
    traits->sharedContext = 0;
    osg::ref_ptr<osg::GraphicsContext> gc =
osg::GraphicsContext::createGraphicsContext( traits.get());
    osgViewer::GraphicsWindow* gw =
dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());

this->osgView->getCamera()->setGraphicsContext(gc.get());
    this->osgView->getCamera()->setViewport(0,0,800,600);
    this->osgView->setCameraManipulator( new
osgGA::TrackballManipulator );


and i update it like this: ( this part is call by WxWidget IDLE event)

    if ((this->osgView) && (!this->osgView->done()))
        this->osgView->frame();
    else
        Close(true);

Now when i push the arrow, i must wait with the arrow pressed to get the
KEYDOWN event.
No problem with the other key, and no problem with the KEYUP event for the
arrows.
Do you got any idea where the problem does come ?

No idea at all I'm afraid.  I'm not a WxWidgets users myself so can't
comment to much.

Robert.
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to