LibWeb: Add WebGLShaderPrecisionFormat

This commit is contained in:
Jelle Raaijmakers 2024-11-13 10:18:51 +01:00 committed by Andreas Kling
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

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