mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibWeb: Add WebGLShaderPrecisionFormat
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
d63a979bde
commit
3d8ab0e67c
Notes:
github-actions[bot]
2024-11-13 10:42:45 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/3d8ab0e67c7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2308
7 changed files with 58 additions and 0 deletions
|
@ -788,6 +788,7 @@ set(SOURCES
|
||||||
WebGL/WebGLRenderingContext.cpp
|
WebGL/WebGLRenderingContext.cpp
|
||||||
WebGL/WebGLRenderingContextBase.cpp
|
WebGL/WebGLRenderingContextBase.cpp
|
||||||
WebGL/WebGLShader.cpp
|
WebGL/WebGLShader.cpp
|
||||||
|
WebGL/WebGLShaderPrecisionFormat.cpp
|
||||||
WebGL/WebGLTexture.cpp
|
WebGL/WebGLTexture.cpp
|
||||||
WebGL/WebGLUniformLocation.cpp
|
WebGL/WebGLUniformLocation.cpp
|
||||||
WebIDL/AbstractOperations.cpp
|
WebIDL/AbstractOperations.cpp
|
||||||
|
|
21
Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.cpp
Normal file
21
Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.cpp
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024, Jelle Raaijmakers <jelle@ladybird.org>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <LibWeb/Bindings/WebGLShaderPrecisionFormatPrototype.h>
|
||||||
|
#include <LibWeb/WebGL/WebGLShaderPrecisionFormat.h>
|
||||||
|
|
||||||
|
namespace Web::WebGL {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(WebGLShaderPrecisionFormat);
|
||||||
|
|
||||||
|
WebGLShaderPrecisionFormat::WebGLShaderPrecisionFormat(JS::Realm& realm)
|
||||||
|
: WebGLObject(realm)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
WebGLShaderPrecisionFormat::~WebGLShaderPrecisionFormat() = default;
|
||||||
|
|
||||||
|
}
|
24
Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.h
Normal file
24
Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.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 WebGLShaderPrecisionFormat final : public WebGLObject {
|
||||||
|
WEB_PLATFORM_OBJECT(WebGLShaderPrecisionFormat, WebGLObject);
|
||||||
|
JS_DECLARE_ALLOCATOR(WebGLShaderPrecisionFormat);
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~WebGLShaderPrecisionFormat();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
explicit WebGLShaderPrecisionFormat(JS::Realm&);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
9
Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.idl
Normal file
9
Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.idl
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#import <WebGL/Types.idl>
|
||||||
|
|
||||||
|
// https://registry.khronos.org/webgl/specs/latest/1.0/#5.12
|
||||||
|
[Exposed=(Window,Worker)]
|
||||||
|
interface WebGLShaderPrecisionFormat {
|
||||||
|
[FIXME] readonly attribute GLint rangeMin;
|
||||||
|
[FIXME] readonly attribute GLint rangeMax;
|
||||||
|
[FIXME] readonly attribute GLint precision;
|
||||||
|
};
|
|
@ -368,6 +368,7 @@ libweb_js_bindings(WebGL/WebGLProgram)
|
||||||
libweb_js_bindings(WebGL/WebGLRenderbuffer)
|
libweb_js_bindings(WebGL/WebGLRenderbuffer)
|
||||||
libweb_js_bindings(WebGL/WebGLRenderingContext)
|
libweb_js_bindings(WebGL/WebGLRenderingContext)
|
||||||
libweb_js_bindings(WebGL/WebGLShader)
|
libweb_js_bindings(WebGL/WebGLShader)
|
||||||
|
libweb_js_bindings(WebGL/WebGLShaderPrecisionFormat)
|
||||||
libweb_js_bindings(WebGL/WebGLTexture)
|
libweb_js_bindings(WebGL/WebGLTexture)
|
||||||
libweb_js_bindings(WebGL/WebGLUniformLocation)
|
libweb_js_bindings(WebGL/WebGLUniformLocation)
|
||||||
libweb_js_bindings(WebIDL/DOMException)
|
libweb_js_bindings(WebIDL/DOMException)
|
||||||
|
|
|
@ -380,6 +380,7 @@ standard_idl_files = [
|
||||||
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderbuffer.idl",
|
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderbuffer.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderingContext.idl",
|
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderingContext.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebGL/WebGLShader.idl",
|
"//Userland/Libraries/LibWeb/WebGL/WebGLShader.idl",
|
||||||
|
"//Userland/Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebGL/WebGLTexture.idl",
|
"//Userland/Libraries/LibWeb/WebGL/WebGLTexture.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebGL/WebGLUniformLocation.idl",
|
"//Userland/Libraries/LibWeb/WebGL/WebGLUniformLocation.idl",
|
||||||
"//Userland/Libraries/LibWeb/WebIDL/DOMException.idl",
|
"//Userland/Libraries/LibWeb/WebIDL/DOMException.idl",
|
||||||
|
|
|
@ -399,6 +399,7 @@ WebGLProgram
|
||||||
WebGLRenderbuffer
|
WebGLRenderbuffer
|
||||||
WebGLRenderingContext
|
WebGLRenderingContext
|
||||||
WebGLShader
|
WebGLShader
|
||||||
|
WebGLShaderPrecisionFormat
|
||||||
WebGLTexture
|
WebGLTexture
|
||||||
WebGLUniformLocation
|
WebGLUniformLocation
|
||||||
WebKitCSSMatrix
|
WebKitCSSMatrix
|
||||||
|
|
Loading…
Reference in a new issue