mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb/WebGL: Implement getShaderPrecisionFormat
This commit is contained in:
parent
a14cd5dab8
commit
bf2b8c5f2b
Notes:
github-actions[bot]
2024-12-05 20:42:25 +00:00
Author: https://github.com/Lubrsi
Commit: bf2b8c5f2b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2791
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/shannonbooth
8 changed files with 59 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
|
||||
* Copyright (c) 2024, Luke Wilde <luke@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -327,6 +328,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
#include <LibWeb/WebGL/WebGLRenderbuffer.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderingContextImpl.h>
|
||||
#include <LibWeb/WebGL/WebGLShader.h>
|
||||
#include <LibWeb/WebGL/WebGLShaderPrecisionFormat.h>
|
||||
#include <LibWeb/WebGL/WebGLTexture.h>
|
||||
#include <LibWeb/WebGL/WebGLUniformLocation.h>
|
||||
#include <LibWeb/WebIDL/Buffers.h>
|
||||
|
@ -718,6 +720,16 @@ public:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "getShaderPrecisionFormat"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
GLint range[2];
|
||||
GLint precision;
|
||||
glGetShaderPrecisionFormat(shadertype, precisiontype, range, &precision);
|
||||
return WebGLShaderPrecisionFormat::create(m_realm, range[0], range[1], precision);
|
||||
)~~~");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "deleteBuffer"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
auto handle = buffer ? buffer->handle() : 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue