mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[client] egl: destroy cached EGLImages when changing format
Reusing cached EGLImages while the frame format has changed will result in visual artifacts. We should instead destroy the EGLImages and let them be recreated.
This commit is contained in:
@@ -269,6 +269,10 @@ bool egl_texture_setup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt, size_
|
||||
glDeleteTextures(1, &texture->dmaTex);
|
||||
glGenFramebuffers(1, &texture->dmaFBO);
|
||||
glGenTextures(1, &texture->dmaTex);
|
||||
|
||||
for (size_t i = 0; i < texture->dmaImageUsed; ++i)
|
||||
eglDestroyImage(texture->display, texture->dmaImages[i].image);
|
||||
texture->dmaImageUsed = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user