In my app I wrote this class function

 

void InitWindowsSystem (osgViewer::Viewer& viewer, const char* const title,
int x, int y, int width, int height)

{

      viewer.setUpViewInWindow(x, y, width, height);

 

      //Get the traits of the current window

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

 

      //Set the title

      traits->windowName = title;

 

      // 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() );

 

//test to see if vsync has changed, but vsyn is alway true

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

 

 

I have searched on forum for a way to do this but no one seem to have a
clear way.

can someone tell me how to do this, pleases?

 

Julio 

 

 

 

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

Reply via email to