mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +00:00
LibWeb: Add WebGLProgram
This commit is contained in:
parent
5d0b206d6e
commit
6b7d5dbec6
Notes:
github-actions[bot]
2024-11-13 10:43:23 +00:00
Author: https://github.com/gmta
Commit: 6b7d5dbec6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2308
7 changed files with 55 additions and 0 deletions
|
@ -782,6 +782,7 @@ set(SOURCES
|
||||||
WebGL/WebGLContextEvent.cpp
|
WebGL/WebGLContextEvent.cpp
|
||||||
WebGL/WebGLFramebuffer.cpp
|
WebGL/WebGLFramebuffer.cpp
|
||||||
WebGL/WebGLObject.cpp
|
WebGL/WebGLObject.cpp
|
||||||
|
WebGL/WebGLProgram.cpp
|
||||||
WebGL/WebGLRenderingContext.cpp
|
WebGL/WebGLRenderingContext.cpp
|
||||||
WebGL/WebGLRenderingContextBase.cpp
|
WebGL/WebGLRenderingContextBase.cpp
|
||||||
WebIDL/AbstractOperations.cpp
|
WebIDL/AbstractOperations.cpp
|
||||||
|
|
21
Libraries/LibWeb/WebGL/WebGLProgram.cpp
Normal file
21
Libraries/LibWeb/WebGL/WebGLProgram.cpp
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <LibWeb/Bindings/WebGLProgramPrototype.h>
|
||||||
|
#include <LibWeb/WebGL/WebGLProgram.h>
|
||||||
|
|
||||||
|
namespace Web::WebGL {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(WebGLProgram);
|
||||||
|
|
||||||
|
WebGLProgram::WebGLProgram(JS::Realm& realm)
|
||||||
|
: WebGLObject(realm)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
WebGLProgram::~WebGLProgram() = default;
|
||||||
|
|
||||||
|
}
|
24
Libraries/LibWeb/WebGL/WebGLProgram.h
Normal file
24
Libraries/LibWeb/WebGL/WebGLProgram.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 WebGLProgram final : public WebGLObject {
|
||||||
|
WEB_PLATFORM_OBJECT(WebGLProgram, WebGLObject);
|
||||||
|
JS_DECLARE_ALLOCATOR(WebGLProgram);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~WebGLProgram();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
explicit WebGLProgram(JS::Realm&);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
6
Libraries/LibWeb/WebGL/WebGLProgram.idl
Normal file
6
Libraries/LibWeb/WebGL/WebGLProgram.idl
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#import <WebGL/WebGLObject.idl>
|
||||||
|
|
||||||
|
// https://registry.khronos.org/webgl/specs/latest/1.0/#5.6
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
|
interface WebGLProgram : WebGLObject {
|
||||||
|
};
|
|
@ -363,6 +363,7 @@ libweb_js_bindings(WebGL/WebGLBuffer)
|
||||||
libweb_js_bindings(WebGL/WebGLContextEvent)
|
libweb_js_bindings(WebGL/WebGLContextEvent)
|
||||||
libweb_js_bindings(WebGL/WebGLFramebuffer)
|
libweb_js_bindings(WebGL/WebGLFramebuffer)
|
||||||
libweb_js_bindings(WebGL/WebGLObject)
|
libweb_js_bindings(WebGL/WebGLObject)
|
||||||
|
libweb_js_bindings(WebGL/WebGLProgram)
|
||||||
libweb_js_bindings(WebGL/WebGLRenderingContext)
|
libweb_js_bindings(WebGL/WebGLRenderingContext)
|
||||||
libweb_js_bindings(WebIDL/DOMException)
|
libweb_js_bindings(WebIDL/DOMException)
|
||||||
libweb_js_bindings(WebSockets/WebSocket)
|
libweb_js_bindings(WebSockets/WebSocket)
|
||||||
|
|
|
@ -375,6 +375,7 @@ standard_idl_files = [
|
||||||
"//Userland/Libraries/LibWeb/WebGL/WebGLContextEvent.idl",
|
"//Userland/Libraries/LibWeb/WebGL/WebGLContextEvent.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebGL/WebGLFramebuffer.idl",
|
"//Userland/Libraries/LibWeb/WebGL/WebGLFramebuffer.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebGL/WebGLObject.idl",
|
"//Userland/Libraries/LibWeb/WebGL/WebGLObject.idl",
|
||||||
|
"//Userland/Libraries/LibWeb/WebGL/WebGLProgram.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderingContext.idl",
|
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderingContext.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebIDL/DOMException.idl",
|
"//Userland/Libraries/LibWeb/WebIDL/DOMException.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebSockets/WebSocket.idl",
|
"//Userland/Libraries/LibWeb/WebSockets/WebSocket.idl",
|
||||||
|
|
|
@ -394,6 +394,7 @@ WebGLBuffer
|
||||||
WebGLContextEvent
|
WebGLContextEvent
|
||||||
WebGLFramebuffer
|
WebGLFramebuffer
|
||||||
WebGLObject
|
WebGLObject
|
||||||
|
WebGLProgram
|
||||||
WebGLRenderingContext
|
WebGLRenderingContext
|
||||||
WebKitCSSMatrix
|
WebKitCSSMatrix
|
||||||
WebSocket
|
WebSocket
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue