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

This commit is contained in:
Jelle Raaijmakers 2024-11-13 10:18:51 +01:00 committed by Andreas Kling
parent d63a979bde
commit 3d8ab0e67c
Notes: github-actions[bot] 2024-11-13 10:42:45 +00:00
7 changed files with 58 additions and 0 deletions

View file

@ -788,6 +788,7 @@ set(SOURCES
WebGL/WebGLRenderingContext.cpp
WebGL/WebGLRenderingContextBase.cpp
WebGL/WebGLShader.cpp
WebGL/WebGLShaderPrecisionFormat.cpp
WebGL/WebGLTexture.cpp
WebGL/WebGLUniformLocation.cpp
WebIDL/AbstractOperations.cpp

View 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;
}

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 WebGLShaderPrecisionFormat final : public WebGLObject {
WEB_PLATFORM_OBJECT(WebGLShaderPrecisionFormat, WebGLObject);
JS_DECLARE_ALLOCATOR(WebGLShaderPrecisionFormat);
public:
virtual ~WebGLShaderPrecisionFormat();
protected:
explicit WebGLShaderPrecisionFormat(JS::Realm&);
};
}

View 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;
};

View file

@ -368,6 +368,7 @@ libweb_js_bindings(WebGL/WebGLProgram)
libweb_js_bindings(WebGL/WebGLRenderbuffer)
libweb_js_bindings(WebGL/WebGLRenderingContext)
libweb_js_bindings(WebGL/WebGLShader)
libweb_js_bindings(WebGL/WebGLShaderPrecisionFormat)
libweb_js_bindings(WebGL/WebGLTexture)
libweb_js_bindings(WebGL/WebGLUniformLocation)
libweb_js_bindings(WebIDL/DOMException)

View file

@ -380,6 +380,7 @@ standard_idl_files = [
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderbuffer.idl",
"//Userland/Libraries/LibWeb/WebGL/WebGLRenderingContext.idl",
"//Userland/Libraries/LibWeb/WebGL/WebGLShader.idl",
"//Userland/Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.idl",
"//Userland/Libraries/LibWeb/WebGL/WebGLTexture.idl",
"//Userland/Libraries/LibWeb/WebGL/WebGLUniformLocation.idl",
"//Userland/Libraries/LibWeb/WebIDL/DOMException.idl",

View file

@ -399,6 +399,7 @@ WebGLProgram
WebGLRenderbuffer
WebGLRenderingContext
WebGLShader
WebGLShaderPrecisionFormat
WebGLTexture
WebGLUniformLocation
WebKitCSSMatrix