Robert,
I do follow the osgCamera example only. I set the screen identification as,
....
osg::GraphicsContext::ScreenIdentifier si;
...
int numScreens;
int numCameras;
numScreens=numCameras=4;
translate=numCameras-1;
for(unsigned int i=0; i<numCameras;
++i, translate_x -= 2.0)
{
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new
osg::GraphicsContext::Traits;
traits->screenNum = i / numScreens;
traits->x = (i*width)/numCameras;
traits->y = 0;
traits->width = width/numCameras-1;
traits->height = height;
traits->windowDecoration = true;
traits->doubleBuffer = true;
//traits->sharedContext = 0;
si.screenNum=i / numScreens ;
traits->setScreenIdentifier(si.displayName());
osg::ref_ptr<osg::GraphicsContext> gc =
osg::GraphicsContext::createGraphicsContext(traits.get());
osg::ref_ptr<osg::Camera> camera = new osg::Camera;
camera->setGraphicsContext(gc.get());
camera->setViewport(new osg::Viewport(0,0, width/numCameras, height));
GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT;
camera->setDrawBuffer(buffer);
camera->setReadBuffer(buffer);
viewer.addSlave(camera.get(), osg::Matrix::scale(aspectRatioScale, 1.0,
1.0)*osg::Matrix::translate(translate_x, 0.0, 0.0), osg::Matrix() );
}
Will this method of setting create individual context on each card if at all I
connected 4 monitors to my cards?
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=26070#26070
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org