From 28a73dc3929bba900167b0d9a859138e00d307f8 Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Mon, 16 Dec 2024 19:31:28 +0000 Subject: [PATCH] LibWeb/WebGL: Implement deleteRenderbuffer --- Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl | 2 +- .../LibWeb/GenerateWebGLRenderingContext.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl b/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl index ec8ac45c8a9..752f24c1708 100644 --- a/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl +++ b/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl @@ -81,7 +81,7 @@ interface mixin WebGLRenderingContextBase { undefined deleteBuffer(WebGLBuffer? buffer); undefined deleteFramebuffer(WebGLFramebuffer? framebuffer); undefined deleteProgram(WebGLProgram? program); - [FIXME] undefined deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); + undefined deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); undefined deleteShader(WebGLShader? shader); undefined deleteTexture(WebGLTexture? texture); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWebGLRenderingContext.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWebGLRenderingContext.cpp index 4f207381714..3cd7fb8e1f0 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWebGLRenderingContext.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWebGLRenderingContext.cpp @@ -1128,6 +1128,14 @@ public: continue; } + if (function.name == "deleteRenderbuffer"sv) { + generate_webgl_object_handle_unwrap(function_impl_generator, "renderbuffer"sv, ""sv); + function_impl_generator.append(R"~~~( + glDeleteRenderbuffers(1, &renderbuffer_handle); +)~~~"); + continue; + } + if (function.name == "deleteTexture"sv) { generate_webgl_object_handle_unwrap(function_impl_generator, "texture"sv, ""sv); function_impl_generator.append(R"~~~(