Hello everybody,

I'm trying to switch on or off the vsync on my NVidia K4200 on Win7 64 bits by using traits->vsync and setting the NVidia parameter to 'Use Application parameters" for the vsync.

Setting vsync to true, works, I can see the OSG_INFO "GraphicsWindowWin32::setSyncToVBlank" as expected.

The problem is I cannot set it to false, because by default the NVidia behaviour is vsync = true (i.e. if nothing is specified the drivers choice is vsync=true).

After digging a little bit I've found in GraphicWindowWin32.cpp  GraphicsWindowWin32::realizeImplementation() that :
  1. vsync is only changed if it is true -> the setSyncToVBlank(bool) is only called if the traits->vsync is true, so you cannot change it to false.
  2. Removing the protection (if vsync equal true), the setSyncToVBlank is not called either because it is in an if condition depending on vsync equal true (if (_traits.valid() && (_traits->sharedContext.valid() || _traits->vsync || _traits->swapGroupEnabled)))

The question is why is there this double protection on the vsync equal true ? Is there a risk that I don't understand (and then please can someone explain  :-) ) about desactivating the vsync ?

Thanks a lot,

Christian

-- 
SCHULTE Christian
Ingénieur Recherche
Responsable du Laboratoire de Simulation
ONERA - DCSD/PSEV
Département Commande des Systèmes et Dynamique du Vol
ONERA - Centre de Salon de Provence
BA 701
13661 SALON AIR Cedex - France
Tel :04.90.17.01.45

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

Reply via email to