No, I do not think that controlling  this at the driver level is the right
way to do that.

I digged a litle and I think I found a better way, in case any anyone wants
to know, here is how it can be done on initilaization

 

 

      //Get the traits of the current window

      osg::ref_ptr< osg::GraphicsContext::Traits > traits = new
osg::GraphicsContext::Traits(
*viewer.getCamera()->getGraphicsContext()->getTraits());

 

      // disable vertical sync

      traits->vsync = false;

 

      //Create a new graphics context with the modified traits

      osg::ref_ptr< osg::GraphicsContext > gc =
osg::GraphicsContext::createGraphicsContext( traits.get() );

 

      // set vertical blank off by default

      osgViewer::Viewer::Windows windows;

      gc->makeCurrent();

      viewer.getWindows(windows);

      for(osgViewer::Viewer::Windows::iterator itr = windows.begin(); itr !=
windows.end(); ++itr) {

            //(*itr)->setSyncToVBlank( !(*itr)->getSyncToVBlank() );

            (*itr)->setSyncToVBlank( traits->vsync );

      }

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to