Hello all
I notice strange code at l231 of PrimitiveSet.cpp:
 
Code:
if (useVertexBufferObjects)
    {
        GLBufferObject* ebo = getOrCreateGLBufferObject(state.getContextID());
        state.bindElementBufferObject(ebo);
        if (ebo)
        {
            if (_numInstances>=1) state.glDrawElementsInstanced(mode, size(), 
GL_UNSIGNED_SHORT, (const GLvoid *)(ebo->getOffset(getBufferIndex())), 
_numInstances);
            else glDrawElements(mode, size(), GL_UNSIGNED_SHORT, (const GLvoid 
*)(ebo->getOffset(getBufferIndex())));
        }
        else
        {
            if (_numInstances>=1) state.glDrawElementsInstanced(mode, size(), 
GL_UNSIGNED_SHORT, &front(), _numInstances);
            else glDrawElements(mode, size(), GL_UNSIGNED_SHORT, &front());
        }
    }
    else



Does state.bindElementBufferObject(ebo); shouldn't be included in the if(ebo) 
test in case theres no index for the geometry?

Thank you!

Cheers,
Julien[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65052#65052





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to