Hi Dimi,

The buffer object support in the OSG has been revamped and in theory
should be robust and flexible... but like all code there is a chance
for regressions so wide spread testing it neccessary.  Whether in this
instance there is an actual bug, or just a different behaviour I can't
say as I haven't tested your code.

As a quick test I would suggest calling dirty on each array your modiy.

Robert.

On Thu, May 19, 2011 at 1:37 PM, dimi christop <[email protected]> wrote:
> 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
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to