Hi David, On 26 March 2012 17:49, David Callu <[email protected]> wrote: > Strange
Even stranger, after a second reboot it's all working fine now... >> I'm guessing the read-back in AdaptNumPixelUnfiform callback is the >> culprit. > > Yes it is. I suppose GL need to wait the end of rendering to get access to > atomic counter buffer. > But a frame take 0.37 ms without read-back and 14.5 ms with the read-back. > I use a GL_STREAM_COPY as buffer usage and I do map/unmap of buffer > to copy the content with memcpy. Perhaps double buffering the atomic counter buffer so that you use the result from the previous frame would work. Another interesting test would be to disable vsync. > I change in shader "#version 420 compatibility" by required extensions. > I add a pre DrawCallback to check if extensions are available. The best place to check for support is via a custom Realize callback that we you do the OpenGL tests prior to the viewer runs it's frame loop. Have a look at the TestSupportOperation in the osgvolume example. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
