diff --git a/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl b/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl index 9892c0d8216..1466f56abe1 100644 --- a/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl +++ b/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.idl @@ -82,7 +82,7 @@ interface mixin WebGLRenderingContextBase { undefined deleteProgram(WebGLProgram? program); [FIXME] undefined deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); undefined deleteShader(WebGLShader? shader); - [FIXME] undefined deleteTexture(WebGLTexture? texture); + undefined deleteTexture(WebGLTexture? texture); undefined depthFunc(GLenum func); undefined depthMask(GLboolean flag); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWebGLRenderingContext.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWebGLRenderingContext.cpp index 083dadccc44..07faeb8b334 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWebGLRenderingContext.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/GenerateWebGLRenderingContext.cpp @@ -726,6 +726,14 @@ public: continue; } + if (function.name == "deleteTexture"sv) { + function_impl_generator.append(R"~~~( + auto handle = texture ? texture->handle() : 0; + glDeleteTextures(1, &handle); +)~~~"); + continue; + } + Vector gl_call_arguments; for (size_t i = 0; i < function.parameters.size(); ++i) { auto const& parameter = function.parameters[i];