Hi Linares, I believe the issue you are up against is pretty common for single threaded multi-context applications, each swap buffers being issued in a different frame. This behavior will vary across drivers so you may will see variations as you move your applications to different hardware/OS/drivers.
There is an OpenGL extension that supports syncronizing of swap buffers across multiple graphics contexts that allows you to assigns contexts to swap groups, the OSG itself doesn't utilize it, but you look into this. I'm afraid I can't recall the name of the extension off the top of my head. Robert. On Tue, Oct 20, 2009 at 5:49 PM, Linares Antonin <antonin.lina...@onera.fr> wrote: > Hi David, > > The osgviewer run as you describe, 60 htz etch and I can also see the > tearing problem. (Quadro NVS 295) > I thinks it's a Qt related problem: > I use the viewerQT / adapterWidget from the osg exemple, so The paint > event is call by a Qtimer and force OSG to run in singleThread mode. > I dont know how call the swap buffer from different thread, by using a > osg::Thread or a Qthread ? How can i call the SwapBuffer with OSG ? > > > Thanks ! > > > > Le lundi 19 octobre 2009 à 09:24 -0500, David Fries a écrit : >> On Mon, Oct 19, 2009 at 11:29:32AM +0000, Linares Antonin wrote: >> > Hi, >> > >> > I actually use 2 osg::viewer embedded in a Qt window, when i enable the >> > sync to vblanc in nvidia-setting my 2 viewers work's to 30 fps while my >> > refresh rate is 60 htz. (and 3 viewers work's to 20fps ...) >> > Did anybody already experiment this issue ? >> > Maybe it's a driver bug, i use osg 2.8.0 with nvidia 180.29 under linux >> > RHEL 5. >> > >> > Thanks you all. >> >> What if you run >> osgviewer cessna.osg >> one, two, or three times? I would expect the same 60Hz, 30Hz, 20Hz. >> In my experience it is graphics card and driver dependent. I'm >> running an nVidia Quadro FX 3700 with driver 185.18.14 and the >> multiple osgviewers will each run at 60Hz, but beyond one it isn't >> always vertical synced as I can see tearing. >> >> I'm guessing the logic, but it seems that swap buffers doesn't return >> until the swap happens, or the swap happend for the previous swap >> buffers on that context. You could try multithreading your swap >> buffers calls, that way all threads are waiting for the swap to happen >> instead of one thread serially waiting on each context to swap. >> > -- > --- > Linares Antonin > ONERA - DCSD > > _______________________________________________ > osg-users mailing list > email@example.com > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list firstname.lastname@example.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org