|
osg::ref_ptr<osg::Group> root = new osg::Group;
root->addChild( osgDB::readNodeFile("cow.osg") );
viewer.setSceneData( root.get() );
viewer.realize();
return viewer.run();
bool MYGUIHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
{
int width = ea.getWindowWidth(), height = ea.getWindowHeight();
switch ( ea.getEventType() )
{
case osgGA::GUIEventAdapter::RESIZE:
break;
default:
break;
}
return false;
} |
|