Added osg::SyncSwapBuffersCallback to include/osg/GraphicsContext and support for enabling it to include/osg/DisplaySettings, and to the Viewer/CompositeViewer::realize() methods.
To enable the sync of swap buffers set the env var OSG_SYNC_SWAP_BUFFERS to ON or 1, to switch off set to OFF or 0. One can also use the --sync command line option for application that pass on command line options to the osg::DisplaySettings::instance(). git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14456 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -544,6 +544,8 @@ void Viewer::realize()
|
||||
{
|
||||
osg::GraphicsContext* gc = *citr;
|
||||
|
||||
if (ds->getSyncSwapBuffers()) gc->setSwapCallback(new osg::SyncSwapBuffersCallback);
|
||||
|
||||
// set the pool sizes, 0 the default will result in no GL object pools.
|
||||
gc->getState()->setMaxTexturePoolSize(maxTexturePoolSize);
|
||||
gc->getState()->setMaxBufferObjectPoolSize(maxBufferObjectPoolSize);
|
||||
|
||||
Reference in New Issue
Block a user