Dear all,
I have a very basic question of how to capture key pressed event in
OpenSceneGraph.
My program is set up like this:

  osgProducer::Viewer *viewer = new osgProducer::Viewer();
  //some more initialization here
  Producer::KeyboardMouse* km = viewer->getKeyboardMouse();
  Producer::RenderSurface* rendersurf = km->getRenderSurface();
  if(rendersurf ==NULL)
        {
                exit(-1);
        }
  viewer->realize();
  while( !viewer->done() )
    {
        
        // wait for all cull and draw threads to complete.
        viewer->sync();

        // update the scene by traversing it with the the update
visitor which will
        // call all node update callbacks and animations.

        viewer->display();
                
        // fire off the cull and draw traversals of the scene.
        viewer->frame();

    }

But I don't know how to capture a key that users pressed to trigger
another event. Could any of you give me a hand.
Thank you,
Dat
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to