Added support for getting all windows and hiding the cursor

This commit is contained in:
Robert Osfield
2007-01-02 12:50:57 +00:00
parent db7df9d6d4
commit d068f7025a
7 changed files with 88 additions and 17 deletions

View File

@@ -36,7 +36,7 @@ int main( int argc, char **argv )
viewer.setCameraManipulator(new osgGA::TrackballManipulator());
viewer.getCamera()->setClearColor(osg::Vec4f(0.6f,0.6f,0.8f,1.0f));
#if 1
#if 0
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
@@ -100,8 +100,6 @@ int main( int argc, char **argv )
viewer.realize();
gw->requestWarpPointer(100,100);
bool limitNumberOfFrames = false;
unsigned int numFrames = 0;
unsigned int maxFrames = 10;

View File

@@ -1580,6 +1580,16 @@ int main( int argc, char **argv )
viewer.realize();
// switch off the cursor
osgViewer::Viewer::Windows windows;
viewer.getWindows(windows);
for(osgViewer::Viewer::Windows::iterator itr = windows.begin();
itr != windows.end();
++itr)
{
(*itr)->useCursor(false);
}
// todo for osgViewer - implement warp pointer
// viewer.requestWarpPointer(0.5f,0.5f);