Hi Kyle,

The removal of the double check to _currentContext.valid() in the
releaseContext() method is a correct fix, and is now merged and
submitted to svn/trunk.

The ViewerBase changes are just wrong and will break the viewer.  The
loops you've tried to optimize away are still required to handle case
where some windows are run with their own thread and some run from the
main thread.  The barrier is essential when you do threading as well.
 W.r.t efficiency, this code is only invoked at most a hundred times a
fame, so is of negligible cost.

Robert.

On Wed, Nov 5, 2008 at 3:35 PM, Centers, Kyle <[EMAIL PROTECTED]> wrote:
> In the attached sourcefiles, I propose two changes. First, in
> include/osgViewer/ViewerBase, the function releaseContext() calls
> _currentContext.valid() twice in the same if-statement. It should only do so
> once.
>
> Second, and this one is a bit questionable (although it works just fine on
> my systems...), in src/osgViewer/ViewerBase.cpp, in the
> renderingTraversals() function, I have found that for multithreaded
> execution, the for-loops containing the calls to
> GraphicsContext::makeCurrent() and GraphicsContext::swapBuffers() are
> unnecessary. So I wrapped that entire section of code in an if-statement
> that checks _threadsRunning. If I'm right, it should provide somewhat more
> efficient execution.
>
> Lastly, my submission is against the 2.6.1 Release.
>
> Thanks,
>
> Kyle
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to