mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-13 06:38:31 +09:00
GL 3.3 core 4.4.2: deleting a texture whose image is attached to the framebuffer currently bound acts as if FramebufferTexture* had been called with texture zero for every attachment point it occupied there. Framebuffers that are not bound keep the orphaned attachment, so only the bound ones are touched. MobileGL unbound a deleted texture from every texture unit and image binding but left framebuffer attachments alone, so the framebuffer went on holding the dead texture alive as its attachment and reads through it returned that texture's contents rather than those of whatever the application put in its place - and since the deleted name usually comes straight back out of the next glGenTextures, the two are indistinguishable from the outside.