On Tue, 24 Mar 2020 at 21:00, OpenSceneGraph Users < email@example.com> wrote:
> > If I'm using the OpenGL debug message extension then I can see a > GL_INVALID_OPERATION > > with the message 'Texture is immutable' caused by a call of > glTexStorage2D in 'Texture2D.cpp' > > in line 309. Both warnings are printed directly after this invalid > operation. > > > > I'm wondering how the texture object can ever be immutable here, because > > it's just created in line 306. > > Looking at the implementation of 'TextureObjectSet::takeOrGenerate', > then a texture object from 'TextureObjectSet::_orphanedTextureObjects' > might be reused and then 'glTexStorage2D' might be called multiple times > on the same texture object, which would then result into > GL_INVALID_OPERATION, > because 'glTexStorage2D' should be only called once and afterwards the > texture object is immutable in this regard. > > Is this right? > Is there some kind of flag missing, if 'glTexStorage2D' has already been > called? > This isn't something I considered when I merged the support for glTexStorage2D. From your description it does sounds like reusing of the texture objects should be forbidden. I haven't looked into the implementation side yet to look at problem so can't suggest a fix. Could you create an example that reproduces the issue? We can then use these as testbed for any fixes we come up with. Cheers, Robert.
_______________________________________________ osg-users mailing list firstname.lastname@example.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org