Context ID for OSG State is never set
AnyOldName3 opened this issue · 1 comments
I'm going to start by saying there's a chance that this is because the application I'm working on is doing something wrong, and a slim chance that this has been fixed already, as it's not using bleeding-edge osgQt, but I've looked through the commit history and don't think anyone's sorted it.
Anyhow, when an OpenGL context is created with regular OSG, the window implementation calls osg::GraphicsContext::createNewContextID()
to generate a unique ID for that context and passes it to osg::State::setContextID()
, allowing things like per-context programs and vertex buffers to work. When a new context is created with osgQt, however, the state's context ID is never set, so if an application uses multiple contexts with the same OSG objects, things break.
It's possible for an application to set this up manually, but this feels like something osgQt should be handling automatically.
In case anyone's following this, I've determined that it actually is being set, so I guess there was a typo when I searched osgQt for the call. In the specific case where I'm seeing issues, the context ID is being reused because the old context has been deleted, but for whatever reason, the per-context program hasn't been cleared. I'm figuring out why now, but I'm closing this issue in the meantime as it isn't correct.