Hi Charles,

Could you updated to 2.0, as osgsimpleviewerWX only existed prior to
2.0, it was replaced by osgviewerWX.  The code is mostly the same
though.

Robert.

On 7/5/07, Charles Cosse <[EMAIL PROTECTED]> wrote:
Hi, below is a section of code from osgsimpleviewerWX.cpp example witth
3 lines added to get  osgViewer::StatsHandler working in the WX window.
On my implementation, at least, the "s" key (intval=65) event doesn't
propagate
to the osg event handler, but the spacebar key (intval=32) does.  So, as you
can see from below, telling the StatsHandler to use the spacebar key event
works.

Still wondering why the "s" key event doesn't get beyond the wx event hander
implementation...if that's really even the problem...

-Charles

-------- @line=52
osgsimpleviewerWX.cpp---------------------------------------------

    viewer->setSceneData(loadedModel.get());
    viewer->setCameraManipulator(new
osgGA::TrackballManipulator);

/*begin new code*/
    osgViewer::StatsHandler *stats_handler=new osgViewer::StatsHandler();

stats_handler->setKeyEventTogglesOnScreenStats(32);//SPACEBAR
    viewer->addEventHandler(stats_handler);
/*end new code*/

    frame->SetViewer(viewer);


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

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

Reply via email to