mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
LibWeb: Add WebGLFramebuffer
This commit is contained in:
parent
b21857b265
commit
5d0b206d6e
Notes:
github-actions[bot]
2024-11-13 10:43:28 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/5d0b206d6ec Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2308
7 changed files with 55 additions and 0 deletions
|
@ -780,6 +780,7 @@ set(SOURCES
|
|||
WebGL/WebGLBuffer.cpp
|
||||
WebGL/WebGLContextAttributes.cpp
|
||||
WebGL/WebGLContextEvent.cpp
|
||||
WebGL/WebGLFramebuffer.cpp
|
||||
WebGL/WebGLObject.cpp
|
||||
WebGL/WebGLRenderingContext.cpp
|
||||
WebGL/WebGLRenderingContextBase.cpp
|
||||
|
|
21
Libraries/LibWeb/WebGL/WebGLFramebuffer.cpp
Normal file
21
Libraries/LibWeb/WebGL/WebGLFramebuffer.cpp
Normal 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;
|
||||
|
||||
}
|
24
Libraries/LibWeb/WebGL/WebGLFramebuffer.h
Normal file
24
Libraries/LibWeb/WebGL/WebGLFramebuffer.h
Normal 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&);
|
||||
};
|
||||
|
||||
}
|
6
Libraries/LibWeb/WebGL/WebGLFramebuffer.idl
Normal file
6
Libraries/LibWeb/WebGL/WebGLFramebuffer.idl
Normal 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 {
|
||||
};
|
|
@ -361,6 +361,7 @@ libweb_js_bindings(WebAudio/OscillatorNode)
|
|||
libweb_js_bindings(WebAudio/PeriodicWave)
|
||||
libweb_js_bindings(WebGL/WebGLBuffer)
|
||||
libweb_js_bindings(WebGL/WebGLContextEvent)
|
||||
libweb_js_bindings(WebGL/WebGLFramebuffer)
|
||||
libweb_js_bindings(WebGL/WebGLObject)
|
||||
libweb_js_bindings(WebGL/WebGLRenderingContext)
|
||||
libweb_js_bindings(WebIDL/DOMException)
|
||||
|
|
|
@ -373,6 +373,7 @@ standard_idl_files = [
|
|||
"//Userland/Libraries/LibWeb/WebAudio/PeriodicWave.idl",
|
||||
"//Userland/Libraries/LibWeb/WebGL/WebGLBuffer.idl",
|
||||
"//Userland/Libraries/LibWeb/WebGL/WebGLContextEvent.idl",
|
||||
"//Userland/Libraries/LibWeb/WebGL/WebGLFramebuffer.idl",
|
||||
"//Userland/Libraries/LibWeb/WebGL/WebGLObject.idl",
|
||||
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderingContext.idl",
|
||||
"//Userland/Libraries/LibWeb/WebIDL/DOMException.idl",
|
||||
|
|
|
@ -392,6 +392,7 @@ WeakRef
|
|||
WeakSet
|
||||
WebGLBuffer
|
||||
WebGLContextEvent
|
||||
WebGLFramebuffer
|
||||
WebGLObject
|
||||
WebGLRenderingContext
|
||||
WebKitCSSMatrix
|
||||
|
|
Loading…
Reference in a new issue