LibWeb/WebGL: Implement deleteFramebuffer

This commit is contained in:
Luke Wilde 2024-12-05 14:26:53 +00:00 committed by Alexander Kalenik
parent 111c4495d9
commit 2e1702a14b
Notes: github-actions[bot] 2024-12-05 20:42:38 +00:00
2 changed files with 9 additions and 1 deletions

View file

@ -78,7 +78,7 @@ interface mixin WebGLRenderingContextBase {
undefined cullFace(GLenum mode);
undefined deleteBuffer(WebGLBuffer? buffer);
[FIXME] undefined deleteFramebuffer(WebGLFramebuffer? framebuffer);
undefined deleteFramebuffer(WebGLFramebuffer? framebuffer);
undefined deleteProgram(WebGLProgram? program);
[FIXME] undefined deleteRenderbuffer(WebGLRenderbuffer? renderbuffer);
undefined deleteShader(WebGLShader? shader);

View file

@ -726,6 +726,14 @@ public:
continue;
}
if (function.name == "deleteFramebuffer"sv) {
function_impl_generator.append(R"~~~(
auto handle = framebuffer ? framebuffer->handle() : 0;
glDeleteFramebuffers(1, &handle);
)~~~");
continue;
}
if (function.name == "deleteTexture"sv) {
function_impl_generator.append(R"~~~(
auto handle = texture ? texture->handle() : 0;