HI Fred,
On Wed, Mar 2, 2011 at 8:35 AM, Fred Smith <[email protected]> wrote:
> Nobody here?
>
> I thought there was a way to remove the makeCurrent(context) /
> makeCurrent(null) calls inbetween the rendering of frames.
> I believe there was a message of Robert about this feature.
I don't recall the method name so... I did:
cd OpenSceneGraph/include/osgViewer
grep Context *
>From the list of responses I got:
ViewerBase: /** Hint to tell the renderingTraversals() method
whether to call relaseContext() on the last
ViewerBase: * and releaseContext on each new frame, helping
performance. However, if you frame loop
ViewerBase: void setReleaseContextAtEndOfFrameHint(bool hint) {
_releaseContextAtEndOfFrameHint = hint; }
ViewerBase: /** Hint to tell the renderingTraversals() method
whether to call relaseContext().*/
So... :
viewer.setReleaseContextAtEndOfFrameHint(false);
Should do what you are after. This will only make a difference when
you are running the viewer single threaded, as with all other
threading models the graphics thread retains the graphics context and
the main thread never has one.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org