HI Dimi, On Fri, May 27, 2011 at 8:21 AM, dimi christop <[email protected]> wrote: > Excellent news > I will the svn right away. > > On a side note, what is the best way in your opinion to update changing vbo > geometry > > say for a morpher. In my code I do a array swap, but is there a faster way?
It all depends upon how you are modifying the geometry data. The most efficient way is to not modify the vertex data at all and do all the computation on the GPU. Downloading two static vertex arrays (use a vertex attrib array) and then morphing between on the GPU is an pretty effective scheme. Swapping arrays like you did is pretty efficient as well, but only call dirty on the data if you have actually modified it though, as the OSG will be able to just do a pointer swap if you just assign a new array, and OpenGL will just happily use the different pointers without any performance cost. Copying the data will have if you are dynamically updating the data on the CPU and can't offload this to the GPU. If you are copying data every frame then using VBO's won't be as valuable, you'll need to performance test using staight vertex arrays vs VBOs. > Thank you for spending time hunting down this bug I have to put my hands up and admit that the regression was done to me, It's good nail regressions so I'm glad that you were able to reproduce the problem. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

