[osg-users] [Any feedback welcome] possible lack of robustness of the VAO path

Robert Osfield robert.osfield at gmail.com
Mon Jan 21 07:01:40 PST 2019


HI Julien,
On Mon, 21 Jan 2019 at 14:51, Julien Valentin
<julienvalentin51 at gmail.com> wrote:
> This mod fix the issue but it's surely not clean enough for you
>
> Code:
> void VertexArrayState::generateVertexArrayObject()
> {
>     _ext->glGenVertexArrays(1, &_vertexArrayObject);
>     if(_vertexArrayObject == _state->getCurrentVertexArrayObject())
>         _state->setCurrentVertexArrayObject(-1);
> }

It's not a fix.  As far as I can work out the bug is a dangling
osg::State::_vas pointer ending up referring to a newly created
VertexArrayState object.  It's only fluke that an issue is appearing
for VAO.  If I am correct and it's an dangling pointer then the
problem has the potential existing more widely than VAO, the VAO side
is a symptom not the cause.

I have been looking into how to properly resolve this dangling pointer issue.

Robert.


More information about the osg-users mailing list