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

Robert Osfield robert.osfield at gmail.com
Fri Feb 17 01:20:08 PST 2017


Hi Jannik,

I had to change the code to always assign a VertexBufferObject as I
couldn't find a way of implementing VAO without forcing changes to
client code, in order to make sure the OSG works on GLcore profile
implementations that require VAO all arrays have to have a
VertexBufferObject.

The observation that display lists are being used the VBO side shows a
bug, display lists and VBO shouldn't be invoked though, we'll need to
review osg::Geometry to make sure VBO's aren't used when display lists
are being generated..

Robert.

On 16 February 2017 at 21:14, Jannik Heller <scrawl at baseoftrash.de> wrote:
> 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
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list