Hi,
I recently upgraded my code base to 2.912 (Linux, GTX 280) , unfortunately my
GPU morphing code stopped working.
I use VBO, GLSL and vertex attributes to copy the changing morph shapes and do
the interpolation on the GPU.
After searching for the problem I found that when I declared a geometry as VBO
// Disable Display lists and setup Vertex Buffer Objects
geom->setUseDisplayList (false);
geom->setUseVertexBufferObjects(true);
osg::VertexBufferObject* df = geom->getOrCreateVertexBufferObject();
df->setUsage (GL_STREAM_DRAW);
the subsequent commands during the update which changed the vertexArray had no
effect and produced random triangles on the screen.
geom->setVertexArray(vcoords);
Because of the many morph shapes, I have many vertex arrays preallocated and
pass them to the geometry based on a time. I do not copy assign to the vertex
array of the geometry for speed reasons.
As I said in the 2.8 version everything worked fine.
When change the code to issued a dirty on the vertex arrays
vcoords->dirty()
the shape morphed correctly but the color, normal, texcoord arrays (which do
not
morph) did not show up correctly.
Has anyone any idea what changed between the 2.8-2.912 versions. I was under
the
impression that issuing a setVertexArray command
calls dirty() at least on the geometry array.
Is it therefore mandatory to issue a dirty() call for all arrays (color,
normal,
texcoords) assigned to the geometry?
Please note then when I disable the VBO usage, a single dirty() call on the
vertexarray works and the other arrays show up normal.
Thank you in advance
Dimi
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org