LibWeb: Add WebGLFramebuffer

This commit is contained in:
Jelle Raaijmakers 2024-11-13 09:46:25 +01:00 committed by Andreas Kling
commit 5d0b206d6e
Notes: github-actions[bot] 2024-11-13 10:43:28 +00:00
7 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/WebGLFramebufferPrototype.h>
#include <LibWeb/WebGL/WebGLFramebuffer.h>
namespace Web::WebGL {
JS_DEFINE_ALLOCATOR(WebGLFramebuffer);
WebGLFramebuffer::WebGLFramebuffer(JS::Realm& realm)
: WebGLObject(realm)
{
}
WebGLFramebuffer::~WebGLFramebuffer() = default;
}

View file

@ -0,0 +1,24 @@
/*
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/WebGL/WebGLObject.h>
namespace Web::WebGL {
class WebGLFramebuffer final : public WebGLObject {
WEB_PLATFORM_OBJECT(WebGLFramebuffer, WebGLObject);
JS_DECLARE_ALLOCATOR(WebGLFramebuffer);
public:
virtual ~WebGLFramebuffer();
protected:
explicit WebGLFramebuffer(JS::Realm&);
};
}

View file

@ -0,0 +1,6 @@
#import <WebGL/WebGLObject.idl>
// https://registry.khronos.org/webgl/specs/latest/1.0/#5.5
[Exposed=(Window,Worker)]
interface WebGLFramebuffer : WebGLObject {
};