[osg-users] Invalid operation on immutable texture

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Tue Mar 24 06:55:03 PDT 2020


> 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?

Greetings,
Daniel


More information about the osg-users mailing list