Changeset 7065 for OpenSceneGraph/trunk/examples/osgwindows/osgwindows.cpp
- Timestamp:
- 07/03/07 19:32:19 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgwindows/osgwindows.cpp
r6941 r7065 45 45 osgViewer::Viewer viewer; 46 46 47 int xoffset = 40; 48 int yoffset = 40; 49 47 50 // left window + left slave camera 48 51 { 49 52 osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits; 50 traits->x = 0;51 traits->y = 0;52 traits->width = 6 40;53 traits->x = xoffset + 0; 54 traits->y = yoffset + 0; 55 traits->width = 600; 53 56 traits->height = 480; 54 57 traits->windowDecoration = true; … … 65 68 camera->setReadBuffer(buffer); 66 69 67 // add this slave cam ra to the viewer, with a shift left of the projection matrix70 // add this slave camera to the viewer, with a shift left of the projection matrix 68 71 viewer.addSlave(camera.get(), osg::Matrixd::translate(1.0,0.0,0.0), osg::Matrixd()); 69 72 } 70 73 71 // left window + left slave camera74 // right window + right slave camera 72 75 { 73 76 osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits; 74 traits->x = 640;75 traits->y = 0;76 traits->width = 6 40;77 traits->x = xoffset + 600; 78 traits->y = yoffset + 0; 79 traits->width = 600; 77 80 traits->height = 480; 78 81 traits->windowDecoration = true; … … 89 92 camera->setReadBuffer(buffer); 90 93 91 // add this slave cam ra to the viewer, with a shift right of the projection matrix94 // add this slave camera to the viewer, with a shift right of the projection matrix 92 95 viewer.addSlave(camera.get(), osg::Matrixd::translate(-1.0,0.0,0.0), osg::Matrixd()); 93 96 }
