What happens to bindings of a destroyed object?
Let's say I created a texture and its ID is 1. Now I bind this texture to a framebuffer with glFramebufferTexture2D.
Now let's say that at some point in runtime I destroyed this texture and created another one, which also has ID equal to 1.
Question: what happens to the binding I made when called glFramebufferTexture2D? I doubt that now this second texture (which has ID = 1 just like the first texture had) is bound to the framebuffer? Or is the binding in a "wrong state" since the first texture has been destroyed?
Read the chapter "Shared Objects and Multiple Contexts" in the OpenGL spec. In particular, section 5.1.2 - Automatic Unbinding of Deleted Objects:
and section 5.1.3 Deleted Object and Object Name Lifetimes
Originally Posted by OpenGL4.3_Compatibility_spec