LibWeb: Clear set WebGL textures when they get deleted

This commit is contained in:
Undefine
2025-12-01 17:36:35 +01:00
committed by Andrew Kaster
parent e9e959876f
commit 4f1f968d80
Notes: github-actions[bot] 2026-02-06 10:39:22 +00:00

View File

@@ -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)