<div dir="ltr"><div><div><div>Hi Antoine,<br><br></div>There isn't much we can pinpoint from the information provided.  It could be a driver bug, it could be a straight out of memory issue.<br><br></div>What OSG version are you using?  What OS/hardware/drivers/build tools are you using?<br></div><div><br></div><div>Have you tried other OS/hadwardware/driver combinations?<br></div><div><br></div>Robert.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 September 2017 at 09:49, Antoine Rennuit <span dir="ltr"><<a href="mailto:antoinerennuit@hotmail.com" target="_blank">antoinerennuit@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear OSG forum,<br>
<br>
I am currently switching from using display lists to using VBOs.<br>
<br>
I display 2 different meshes with it:<br>
<br>
         one is a usual mesh with ~1000 triangles<br>
<br>
         the other one is very dense ~10M vertices (from a room scan)<br>
<br>
<br>
<br>
The usual mesh displays fine with the VBOs, but when adding the dense mesh I have a crash in the rendering, here is my calls stack:<br>
<br>
[img]<a href="https://drive.google.com/open?id=0B4i1g-UqIF8yZFk4TlRrblVrUVk[/img]" rel="noreferrer" target="_blank">https://drive.google.com/<wbr>open?id=0B4i1g-<wbr>UqIF8yZFk4TlRrblVrUVk[/img]</a><br>
<br>
As you can see, it is really at the rendering stage that the problem happens, not when setting up the VBO.<br>
<br>
Here is my code<br>
<br>
<br>
Code:<br>
<br>
osg::ref_ptr<osg::Geode> SetupMesh(const Eigen::Vector3Array& vertices, IntegerArray const& triangles, const Eigen::Vector3Array& normals, const osg::Vec4f& color, Node* node)<br>
{<br>
    osg::ref_ptr<osg::Geode> geode = new osg::Geode();<br>
    assert(geode);<br>
    osg::ref_ptr<osg::Geometry> geometry = new osg::Geometry();<br>
    assert(geometry);<br>
    osg::ref_ptr<osg::Vec3Array> vertices_osg = new osg::Vec3Array();<br>
    assert(vertices_osg);<br>
    osg::ref_ptr<osg::Vec3Array> normals_osg = new osg::Vec3Array();<br>
    assert(normals_osg);<br>
    osg::ref_ptr<osg::<wbr>DrawElementsUInt> triangles_osg = new osg::DrawElementsUInt(osg::<wbr>PrimitiveSet::TRIANGLES, 0);<br>
    assert(triangles_osg);<br>
    osg::ref_ptr<osg::Vec4Array> colors = new osg::Vec4Array();<br>
    assert(colors);<br>
<br>
    osg::ref_ptr<NodeReference> userData = new NodeReference(node);<br>
    geometry->setUserData(<wbr>userData);<br>
<br>
    // VBO.<br>
//    geometry->setUseDisplayList(<wbr>false);<br>
    geometry-><wbr>setUseVertexBufferObjects(<wbr>true);<br>
<br>
    // Setup.<br>
    geode->addDrawable(geometry);<br>
    geometry->setVertexArray(<wbr>vertices_osg);<br>
    geometry->setNormalArray(<wbr>normals_osg);<br>
    geometry->addPrimitiveSet(<wbr>triangles_osg);<br>
    geometry->setColorArray(<wbr>colors);<br>
<br>
    // Vertices.<br>
    vertices_osg->reserve(<wbr>vertices.size());<br>
    for (int i = 0; i < vertices.size(); ++i)<br>
        vertices_osg->push_back(<wbr>EigenToOsgVector3(vertices[i])<wbr>);<br>
<br>
    // Normals.<br>
    normals_osg->setBinding(osg::<wbr>Array::BIND_PER_VERTEX);<br>
<br>
    normals_osg->reserve(normals.<wbr>size());<br>
    for (int i = 0; i < normals.size(); ++i)<br>
        normals_osg->push_back(<wbr>EigenToOsgVector3(normals[i]))<wbr>;<br>
<br>
    // Triangles.<br>
    triangles_osg->reserve(<wbr>triangles.size());<br>
    for (int i = 0; i < triangles.size(); ++i)<br>
        triangles_osg->push_back(<wbr>triangles[i]);<br>
<br>
    // Colors.<br>
    colors->setBinding(osg::Array:<wbr>:BIND_OVERALL);<br>
<br>
    colors->push_back(color);<br>
<br>
    return geode;<br>
}<br>
<br>
<br>
<br>
<br>
Any idea of what's going on?<br>
<br>
Thanks,<br>
<br>
Antoine[/code]<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=71638#71638" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=71638#<wbr>71638</a><br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div><br></div>