mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
LibWeb: Add WebGLBuffer
This commit is contained in:
parent
e6ee7f3e64
commit
b21857b265
Notes:
github-actions[bot]
2024-11-13 10:43:35 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/b21857b2658 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2308
8 changed files with 56 additions and 1 deletions
|
@ -777,6 +777,7 @@ set(SOURCES
|
|||
WebDriver/TimeoutsConfiguration.cpp
|
||||
WebGL/EventNames.cpp
|
||||
WebGL/OpenGLContext.cpp
|
||||
WebGL/WebGLBuffer.cpp
|
||||
WebGL/WebGLContextAttributes.cpp
|
||||
WebGL/WebGLContextEvent.cpp
|
||||
WebGL/WebGLObject.cpp
|
||||
|
|
21
Libraries/LibWeb/WebGL/WebGLBuffer.cpp
Normal file
21
Libraries/LibWeb/WebGL/WebGLBuffer.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/WebGLBufferPrototype.h>
|
||||
#include <LibWeb/WebGL/WebGLBuffer.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(WebGLBuffer);
|
||||
|
||||
WebGLBuffer::WebGLBuffer(JS::Realm& realm)
|
||||
: WebGLObject(realm)
|
||||
{
|
||||
}
|
||||
|
||||
WebGLBuffer::~WebGLBuffer() = default;
|
||||
|
||||
}
|
24
Libraries/LibWeb/WebGL/WebGLBuffer.h
Normal file
24
Libraries/LibWeb/WebGL/WebGLBuffer.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 WebGLBuffer final : public WebGLObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLBuffer, WebGLObject);
|
||||
JS_DECLARE_ALLOCATOR(WebGLBuffer);
|
||||
|
||||
public:
|
||||
virtual ~WebGLBuffer();
|
||||
|
||||
protected:
|
||||
explicit WebGLBuffer(JS::Realm&);
|
||||
};
|
||||
|
||||
}
|
6
Libraries/LibWeb/WebGL/WebGLBuffer.idl
Normal file
6
Libraries/LibWeb/WebGL/WebGLBuffer.idl
Normal file
|
@ -0,0 +1,6 @@
|
|||
#import <WebGL/WebGLObject.idl>
|
||||
|
||||
// https://registry.khronos.org/webgl/specs/latest/1.0/#5.4
|
||||
[Exposed=(Window,Worker)]
|
||||
interface WebGLBuffer : WebGLObject {
|
||||
};
|
|
@ -11,7 +11,7 @@
|
|||
namespace Web::WebGL {
|
||||
|
||||
class WebGLObject : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(WebGLRenderingContextBase, Bindings::PlatformObject);
|
||||
WEB_PLATFORM_OBJECT(WebGLObject, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
virtual ~WebGLObject();
|
||||
|
|
|
@ -359,6 +359,7 @@ libweb_js_bindings(WebAudio/GainNode)
|
|||
libweb_js_bindings(WebAudio/OfflineAudioContext)
|
||||
libweb_js_bindings(WebAudio/OscillatorNode)
|
||||
libweb_js_bindings(WebAudio/PeriodicWave)
|
||||
libweb_js_bindings(WebGL/WebGLBuffer)
|
||||
libweb_js_bindings(WebGL/WebGLContextEvent)
|
||||
libweb_js_bindings(WebGL/WebGLObject)
|
||||
libweb_js_bindings(WebGL/WebGLRenderingContext)
|
||||
|
|
|
@ -371,6 +371,7 @@ standard_idl_files = [
|
|||
"//Userland/Libraries/LibWeb/WebAudio/OfflineAudioContext.idl",
|
||||
"//Userland/Libraries/LibWeb/WebAudio/OscillatorNode.idl",
|
||||
"//Userland/Libraries/LibWeb/WebAudio/PeriodicWave.idl",
|
||||
"//Userland/Libraries/LibWeb/WebGL/WebGLBuffer.idl",
|
||||
"//Userland/Libraries/LibWeb/WebGL/WebGLContextEvent.idl",
|
||||
"//Userland/Libraries/LibWeb/WebGL/WebGLObject.idl",
|
||||
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderingContext.idl",
|
||||
|
|
|
@ -390,6 +390,7 @@ VisualViewport
|
|||
WeakMap
|
||||
WeakRef
|
||||
WeakSet
|
||||
WebGLBuffer
|
||||
WebGLContextEvent
|
||||
WebGLObject
|
||||
WebGLRenderingContext
|
||||
|
|
Loading…
Reference in a new issue