mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 22:28:32 +09:00
[Fix] (MG_Impl/Texture): validate the bound texture before dereferencing it in TexSubImage2D, and stop recording an error when glDeleteTextures is handed unknown names
This commit is contained in:
@@ -110,6 +110,9 @@ namespace MobileGL::MG_State::GLState {
|
||||
BumpTextureBindGeneration();
|
||||
m_textureObjects.erase(index);
|
||||
}
|
||||
// Release the name itself even when GenTextures only reserved it and no bind ever
|
||||
// instantiated an object: GL 3.3 core 3.8.1 makes a deleted name unused again (so a
|
||||
// later bind of it must fail), and the reservation has to return to the free list.
|
||||
m_indexGenerator.Delete(index);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user