Hi Torben, On Thu, Apr 22, 2010 at 9:02 AM, Torben Dannhauer <[email protected]> wrote: > thanks. As posted in General forum, osgviewer does not work. > > I tried to fix fixed it by reorganizing > GraphicsWindowWin32::realizeImplementation() to the old style, holding the > vsync parts. > > Now osgviewer works again, but I can't toggle vsync. Do I have to install a > seperate handler, or is it integrated in the stats handler ? > I have configured my nvidia to enable vsync on application demand, but it is > always on. > > I attached my current version if you like to check, otherwise discard.
I've just reviewed your change, and given your error it sounds like you've hidden one error and opened the door for another one. First curious thing is why the RestoreContext usage is failing for you. If it's failing right now then it suggest to me that it may well have been failing for a while when sharing contexts, so by moving the RestoreContext usage out of normal operation I suspect you're just hiding this error that needs fixing. I wonder if a wglMakeCurrent(..) call would be better than a call to makeCurrent(), making the process more explicit. The error that you've open the door to is setSyncToVBlank() call is only safe to call from a valid graphics context - this is why I put the setSyncToVBlank() call after the makeCurrent(). The reason why your changes don't cause problems is that I've temporarily commented out the guts of the setSyncToVBlank() implementation. If you ready earlier in this thread you'll see my motivation for doing this. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
