Hi Anna, Robbert,
I think the bufferswaps on window are by default not synchronized, a call to wglJoinSwapGroupNV(HDC hdc, GLuint group) is needed to make different windows synchronize.
the osg lib has the code to make the call, just set
    traits->swapGroupEnabled = true;
before
    createGraphicsContext(traits);


Output should look like: (set OSG_NOTIFY_LEVEL=INFO)
GraphicsCostEstimator::calibrate(..)
GraphicsWindowWin32::setSyncToVBlank on
GraphicsWindowWin32::wglJoinSwapGroupNV (0) returned 1
GraphicsWindowWin32::wglBindSwapBarrierNV (0, 0) returned 0

the wglBindSwapBarrierNV fails if you don't have a gsync card (hardware connection card for multiple graphics cards)

Still, as Robbert says, a single graphics window is likely to perform better, and is of course automatically in sync. But I
suppose you don't want fullscreen with stereo mode VERTICAL_SPLIT.

Laurens.

On 1/16/2012 10:17 AM, Robert Osfield wrote:
Hi Anna,

This should work out of the box - the two windows should be rendering
and synchronised.  How are you setting up your viewer and graphics
contexts?

A a general note, if you are using a single graphics card for best
performance one usually tries to use a single graphics window and have
two cameras or more share this context.  Is there a reason why you
need two separate windows rather than a single window with two views?

Robert.

On 14 January 2012 21:21, Anna Sokol<annaso...@gmail.com>  wrote:
Hi,

I am trying to figure out how to keep multiple graphics contexts in frame
sync.

My operating system is Windows XP SP3.
My graphics is NVidia Quadro NVS 290 with the latest driver 276.42.
I'm using OpenSceneGraph 3.0.1 compiled with Visual C++ 2005 for win32.

I have vsync on in the driver and in Traits, also I am using a
CullDrawThreadPerContext as the threading model.
I have 2 graphics windows with separate contexts showing the same scene with
a "left" and "right" view on one display.
I have the scene moving across both windows so that I can see if its
properly syncing.
It sometimes visibly looks to be a number of frames out of sync (i.e. one of
the rendered context is dragging behind).
What could be causing this? In the threads? Or down in the graphics card?
Is there any specific settings I should set to make the rendered contexts
stay in frame sync?


Regards,
Anna Sokol
_____________________________________________________
"Once we accept our limits, we go beyond them. " -- Albert Einstein

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

Reply via email to