[osg-users] Vertex Buffer Object used inside display list

Jannik Heller scrawl at baseoftrash.de
Thu Feb 16 13:14:43 PST 2017


Hi,

I've noticed some odd API usage in the OSG that seems to have started with the VAO support changes in OSG 3.5. Vertex buffer objects are being used inside a display list. This happens on a standard Geometry with default settings. Example:

glNewList(6, GL_COMPILE)
glGenBuffers(1, [5])
glBindBuffer(GL_ARRAY_BUFFER, 5)
glBufferData(...)
glBufferSubData(...) x4
glVertexPointer(3, GL_FLOAT, 0, NULL)
glNormalPointer(GL_FLOAT, 0, 0x90)
glColorPointer(4, GL_FLOAT, 0x180)
glTexCoordPointer(2, GL_FLOAT, 0, 0x120)
glDrawElements(...)
glBindBuffer(GL_ARRAY_BUFFER, 0)
glEndList()

The source of this change in behavior is here: https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osg/Geometry.cpp#L187 OSG will now always assign VBOs, even if they weren't requested.

First off all I find this usage very odd. The GL standard doesn't actually specify what is supposed to happen to VBOs in a display list - is the VBO simply ignored or could that cause a new VBO to be created with every call to the display list? Even if this works, the calls are completely redundant and could be removed.

More importantly, though, and the reason I'm bringing it up, is that this usage seems to be causing a crash with some versions of Mesa drivers, and the crash goes away when I disable display lists.

Ubuntu 14.04 - Nvidia: works
Ubuntu 14.04 - Intel HD: broken
Ubuntu 16.04 - Intel HD: broken

I've attached a minimal-ish apitrace you can use to see if your driver is affected - run it with 'apitrace replay <file>' , if you get 'caught signal 11' that means the driver has crashed.

Cheers,
Jannik

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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: vbo_displaylist.trace.zip
Type: application/zip
Size: 68526 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170216/8dabefb6/attachment-0002.zip>


More information about the osg-users mailing list