Changeset 5822 for OpenSceneGraph/trunk/examples/osgcamera/osgcamera.cpp
- Timestamp:
- 12/17/06 21:49:01 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgcamera/osgcamera.cpp
r5757 r5822 149 149 } 150 150 151 unsigned int numberCameras = 3; 151 osg::GraphicsContext::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface(); 152 if (!wsi) 153 { 154 std::cout<<"No WindowSystemInterface available, cannot create windows."<<std::endl; 155 return 1; 156 } 157 158 unsigned int numScreens = wsi->getNumScreens(); 159 for(unsigned int i=0; i<numScreens; ++i) 160 { 161 osg::GraphicsContext::ScreenIdentifier si; 162 si._screenNum = 0; 163 164 unsigned int width, height; 165 wsi->getScreenResolution(si, width, height); 166 167 std::cout<<"screen= "<<i<<" width="<<width<<" height="<<height<<std::endl; 168 } 169 170 171 unsigned int numberCameras = numScreens; 152 172 while (arguments.read("--cameras",numberCameras)) {} 153 173 … … 187 207 CameraList cameraList; 188 208 GraphicsContextSet graphicsContextSet; 209 210 189 211 190 212 // create the cameras, graphic contexts and graphic threads. … … 198 220 osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits; 199 221 traits->_windowName = "osgcamera"; 222 traits->_screenNum = i % numScreens; 200 223 traits->_x = xpos; 201 224 traits->_y = ypos;
