Added bare bones osgGA::SimpleViewer class to help simplify OSG setup when embedding the OSG

into existing GUI applications, and for one one a single camera, single window is required.
This commit is contained in:
Robert Osfield
2006-09-25 16:25:53 +00:00
parent 78444878c3
commit 5c0eb0b013
17 changed files with 552 additions and 179 deletions

View File

@@ -158,9 +158,7 @@ void KeyboardMouseCallback::updateWindowSize()
maxY = osg::maximum(maxY,ir.bottom()+ir.height());
}
// osg::notify(osg::NOTICE)<<"IA ea->setWindowSize("<<minX<<","<<minY<<","<<maxX<<","<<maxY<<")"<<std::endl;
ea->setWindowSize(minX,minY,maxX,maxY);
ea->setInputRange(minX,minY,maxX,maxY);
}
else if (rs)
{
@@ -175,7 +173,12 @@ void KeyboardMouseCallback::updateWindowSize()
// osg::notify(osg::NOTICE)<<"RS ea->setWindowSize("<<minX<<","<<minY<<","<<maxX<<","<<maxY<<")"<<std::endl;
ea->setWindowSize(minX,minY,maxX,maxY);
ea->setInputRange(minX,minY,maxX,maxY);
}
if (rs)
{
ea->setWindowRectangle(rs->getWindowOriginX(), rs->getWindowOriginY(), rs->getWindowWidth(),rs->getWindowHeight());
}
}