-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Add WebGLShaderPrecisionFormat
(cherry picked from commit 3d8ab0e67c707062e4d889598fbd176fa0c6fce8)
- Loading branch information
Showing
7 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
Userland/Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright (c) 2024, Jelle Raaijmakers <[email protected]> | ||
* | ||
* 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 changes: 24 additions & 0 deletions
24
Userland/Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) 2024, Jelle Raaijmakers <[email protected]> | ||
* | ||
* 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 changes: 9 additions & 0 deletions
9
Userland/Libraries/LibWeb/WebGL/WebGLShaderPrecisionFormat.idl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters