GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4.
When the client called glDeleteBuffers, target buffer might be implicitly unbound from any attach points. But since gl4es state cache do not handle such implicit unbinding of buffers, client can cause random crash. For example:
Client generate buffer name with glGenBuffers (=> buffer name X)
Client attach X to array buffer
gl4es caches X inside its state cache
Client delete buffer X with glDeleteBuffers
Client generate buffer and server assigned same name X for the new object
Client attach (newly created) buffer X
gl4es ignores request since they thinks we have already attached buffer X
Client try to draw something and server will crash since buffer is not bound to the binding point
at: https://github.com/ptitSeb/gl4es/commit/f5dda93ac7eaf1e3a44b1ee5585a6bf61d0656c5 Found by: wined3d (GLSL backend) + https://github.com/google/angle/commit/4a4ae726c449b719fc3d2ff258c0cded8adb07bd (Vulkan backend) on Win32
When the client called
glDeleteBuffers
, target buffer might be implicitly unbound from any attach points. But since gl4es state cache do not handle such implicit unbinding of buffers, client can cause random crash. For example:glGenBuffers
(=> buffer name X)glDeleteBuffers
Avoiding any use of caching https://github.com/okuoku/gl4es/commit/71ebbd66737b610f7c382e259ebb6fa685a369aa fixes issue when ANGLE used as GLES backend of gl4es -- it seems (unfortunately) ANGLE quickly re-use object names.