Hi Tim,
On Tue, Nov 9, 2010 at 5:28 PM, Robert Osfield <[email protected]> wrote: > I'll have another look at your submission tomorrow and have a think > about the issue. I have reviewed your changes again, and this time merged them with a few changes. I've removed the swap buffers callback in ViewerBase.cpp, and instead move the setting of ticks into a osg::State::frameCompleted() method that is called just before the swap buffers implementation via the new GraphicsContext convinience method implemented thus: /** convinience method for handling whether to call swapbuffers callback or the standard context swapBuffersImplementation. * swapBuffersCallbackOrImplemenation() is called by swapBuffers() and osg::SwapBuffersOperation, end users should normally * call swapBuffers() rather than swapBuffersCallbackOrImplemenation(). */ void swapBuffersCallbackOrImplemenation() { if (_state.valid()) _state->frameCompleted(); if (_swapCallback.valid()) _swapCallback->swapBuffersImplementation(this); else swapBuffersImplementation(); } The GraphicsContext::swapBuffers() and SwapBufferOperation() now call this new method to ensure that the callback is called when required. and that the tick code in the frameCompleted() is called. I've just tested this on my Kubnutu 9.04 system that has old ATI drivers that doesn't support the extension and it just works as before, but rebooting into my Kubuntu 10.10 system with up to date ATI drivers I get a warning on the console: timestamp query counter bits: 0 Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile Not sure what to make of this yet. Could you check out svn/trunk and have a look to see if things work at your end, there is a chance I've missed something along the way. I will try on my NVidia laptop to see it works better. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
