mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibWeb: Clear set WebGL textures when they get deleted
This commit is contained in:
Notes:
github-actions[bot]
2026-02-06 10:39:22 +00:00
Author: https://github.com/cqundefine Commit: https://github.com/LadybirdBrowser/ladybird/commit/4f1f968d801 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6978 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/gmta Reviewed-by: https://github.com/konradekk
@@ -533,6 +533,15 @@ void WebGLRenderingContextImpl::delete_texture(GC::Root<WebGLTexture> texture)
|
||||
}
|
||||
|
||||
glDeleteTextures(1, &texture_handle);
|
||||
|
||||
if (m_texture_binding_2d == texture)
|
||||
m_texture_binding_2d = nullptr;
|
||||
if (m_texture_binding_cube_map == texture)
|
||||
m_texture_binding_cube_map = nullptr;
|
||||
if (m_texture_binding_2d_array == texture)
|
||||
m_texture_binding_2d_array = nullptr;
|
||||
if (m_texture_binding_3d == texture)
|
||||
m_texture_binding_3d = nullptr;
|
||||
}
|
||||
|
||||
void WebGLRenderingContextImpl::depth_func(WebIDL::UnsignedLong func)
|
||||
|
||||
Reference in New Issue
Block a user