If you have an Nvidia card, you can set the environment variable
__GL_SYNC_TO_VBLANK=1 or =0 to enable or disable vertical syncing, but this
must be done before the graphics context is initialized. I'm not sure how
to do it for ATI or Intel chips. A google search turned up this tip for ATI
cards: http://www.stolk.org/debian/vblank-fglrx.html (I haven't tried it
though).


On Tue, Oct 15, 2013 at 11:08 AM, Julio Jerez <jerezjul...@gmail.com> wrote:

> 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
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to