Hi Robert,

> From your description it does sounds like reusing of the texture
> objects should be forbidden.

I think it might be fine to reuse the texture objects, because
'Texture::generateAndAssignTextureObject' takes all the parameters
needed by 'glTexStorage2D', so the returned texture object should
already have the right storage. What currently is missing, is a flag on
the texture object, if 'glTexStorage2D' has already been called for it.

> Could you create an example that reproduces the issue? We can then
> use these as testbed for any fixes we come up with.

I don't quite know how I should trigger this case in an example. I've
suspected that if a Texture2D gets deleted, then somehow its texture
object gets added to 'TextureObjectSet::_orphanedTextureObjects'. But
I can't find this in the code. I'm only seeing additions to
'_orphanedTextureObjects' in 'TextureObjectSet::deleteAllTextureObjects'
and 'TextureObjectSet::handlePendingOrphandedTextureObjects'.

osg-users mailing list

Reply via email to